{"id":"CVE-2025-0913","published":"2025-06-11T17:17:25Z","modified":"2025-06-11T17:37:52Z","title":"Inconsistent handling of O_CREATE|O_EXCL on Unix and Windows in os in syscall","vendor":"Go standard library","product":"syscall","tier":"tail","description":{"text":"os.OpenFile(path, os.O_CREATE|O_EXCL) behaved differently on Unix and Windows systems when the target path was a dangling symlink. On Unix systems, OpenFile with O_CREATE and O_EXCL flags never follows symlinks. On Windows, when the target path was a symlink to a nonexistent location, OpenFile would create a file in that location. OpenFile now always returns an error when the O_CREATE and O_EXCL flags are both set and the target path is a symlink.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00327,"percentile":0.26446,"provenance":"source"},"cwes":[],"references":[{"url":"https://go.dev/cl/672396","tags":[]},{"url":"https://go.dev/issue/73702","tags":[]},{"url":"https://groups.google.com/g/golang-announce/c/ufZ8WpEsA3A","tags":[]},{"url":"https://pkg.go.dev/vuln/GO-2025-3750","tags":[]}],"priority":{"score":9.1,"factors":[{"name":"EPSS percentile","points":5.29},{"name":"CVSS severity","points":3.85}]},"vendorSlug":"go-standard-library","affectedVersions":[{"vendor":"Go standard library","product":"syscall","versions":["< 1.23.10",">= 1.24.0-0, < 1.24.4"]},{"vendor":"Go standard library","product":"os","versions":["< 1.23.10",">= 1.24.0-0, < 1.24.4"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-06-11T17:35:44.313980Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"stdlib","vulnerableRanges":["<1.23.10",">=1.24.0-0, <1.24.4"],"patched":["1.23.10","1.24.4"],"from":["GO-2025-3750"],"provenance":"source"}],"summary":{"text":"The flaw lies in the os package of the Go standard library, specifically in its syscall-backed handling of os.OpenFile when the O_CREATE and O_EXCL flags are combined: on Windows, a dangling symlink at the target path caused a file to be created at the symlink's nonexistent destination, whereas Unix never followed the link. An attacker with local access and low privileges, who can place a symlink at the target path without any user interaction, can cause files to be created in unintended locations, though no configuration beyond calling OpenFile with those flags is required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:09:10Z"},"euvd":{"id":"EUVD-2025-18139","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-22870","published":"2025-03-12","fixed":"1.24.1","kev":false},{"cve":"CVE-2025-22871","published":"2025-04-08","fixed":"1.24.2","kev":false},{"cve":"CVE-2025-22873","published":"2026-02-04","fixed":"1.24.3","kev":false},{"cve":"CVE-2025-0913","published":"2025-06-11","fixed":"1.24.4","kev":false},{"cve":"CVE-2025-22874","published":"2025-06-11","fixed":"1.24.4","kev":false},{"cve":"CVE-2025-4673","published":"2025-06-11","fixed":"1.24.4","kev":false},{"cve":"CVE-2025-47906","published":"2025-09-18","fixed":"1.24.6","kev":false,"link":{"from":"CVE-2025-0913","to":"CVE-2025-47906","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:stdlib","fromFixed":"1.23.10","toFixed":"1.23.12","daysApart":99}]}},{"cve":"CVE-2025-47907","published":"2025-08-07","fixed":"1.24.6","kev":false,"link":{"from":"CVE-2025-0913","to":"CVE-2025-47907","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:stdlib","fromFixed":"1.23.10","toFixed":"1.23.12","daysApart":57}]}}],"package":"Go:stdlib"}}