Medium severity · published Jun 11, 2025
CVE-2025-0913
Inconsistent handling of O_CREATE|O_EXCL on Unix and Windows in os in syscall
5.5
CVSS
0.3%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
None
Integrity
High
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.3% · higher than 25% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
OS
os · Go standard library
before 1.23.10; 1.24.0-0 before 1.24.4 · source: vendor
SY
syscall · Go standard library
before 1.23.10; 1.24.0-0 before 1.24.4 · source: vendor
GO
GO · Golang
before 1.23.10; 1.24.0 before 1.24.4 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-0913
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-0913
Issue Tracking
https://go.dev/cl/672396
Issue Tracking
https://go.dev/issue/73702
Mailing List
https://groups.google.com/g/golang-announce/c/ufZ8WpEsA3A
Vendor Advisory
https://pkg.go.dev/vuln/GO-2025-3750
More from os
9.8
CVE-2026-56857
Root.Mkdir(All) can follow junctions out of the root on Windows in os
7.8
CVE-2026-39822
Root escape via symlink plus trailing slash in os
3.8
CVE-2025-22873
Improper access to parent directory of root in os
2.5
CVE-2026-27139
FileInfo can escape from a Root in os
