CVE-2025-0913: os.OpenFile(path, os.O_CREATE|O_EXCL) behaved differently on Unix and Windows systems when the target path was a dangling symlink.
Medium CVSS 5.5
- CVE id
- CVE-2025-0913
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| Go Runtimes and servers |
< 1.23.10 >= 1.24.0, < 1.24.4 |
1.23.10, 1.24.4 |
How to fix it
Upgrade Go to the fixed release of the line you run: 1.23.10, 1.24.4.
go version
- Build with the patched Go release (set "toolchain" in go.mod, or the golang image tag) and redeploy: Go programs include the standard library, so they must be rebuilt.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
os.OpenFile(path, os.OCREATE|OEXCL) behaved differently on Unix and Windows systems when the target path was a dangling symlink. On Unix systems, OpenFile with OCREATE and OEXCL 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 OCREATE and OEXCL flags are both set and the target path is a symlink.
References
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.