CVE-2025-0913Link Following in Standard Library OS

CWE-59Link Following7 documents6 sources
Severity
5.5MEDIUMNVD
EPSS
0.0%
top 88.02%
CISA KEV
Not in KEV
Exploit
No known exploits
Timeline
PublishedJun 11

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:NExploitability: 1.8 | Impact: 3.6

Affected Packages3 packages

NVDgolang/go1.24.01.24.4+1
CVEListV5go_standard_library/os1.24.0-01.24.4+1
CVEListV5go_standard_library/syscall1.24.0-01.24.4+1

🔴Vulnerability Details

4
GHSA
GHSA-jw54-c8rr-pjpq: os2025-06-11
OSV
Inconsistent handling of O_CREATE|O_EXCL on Unix and Windows in os in syscall2025-06-11
OSV
CVE-2025-0913: os2025-06-11
CVEList
Inconsistent handling of O_CREATE|O_EXCL on Unix and Windows in os in syscall2025-06-11

📋Vendor Advisories

2
Microsoft
Inconsistent handling of O_CREATE|O_EXCL on Unix and Windows in os in syscall2025-06-10
Debian
CVE-2025-0913: golang-1.15 - os.OpenFile(path, os.O_CREATE|O_EXCL) behaved differently on Unix and Windows sy...2025
CVE-2025-0913 — Link Following in Standard Library OS | cvebase