CVE-2025-0913 Details
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.
A vulnerability exists in the Go programming language's standard library, specifically in the 'os' and 'syscall' packages, prior to version 1.24.4. The issue arises from inconsistent behavior of the 'OpenFile' function when using the 'O_CREATE' and 'O_EXCL' flags in conjunction with dangling symbolic links. On Unix systems, 'OpenFile' correctly fails when the target is a symlink, as per the expected behavior outlined in the manpage for the 'open' system call. However, on Windows, 'OpenFile' would erroneously create a file at the location of a dangling symlink, leading to potential unintended file creation. This vulnerability has been addressed in Go version 1.24.4, which ensures that 'OpenFile' returns an error when both 'O_CREATE' and 'O_EXCL' are set and the target is a symlink.
Users can upgrade to Go version 1.24.4 or 1.23.10, both of which include the necessary fix. Instructions for downloading these versions are available on the Go website.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jun 11, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://go.dev/cl/672396 | [email protected] | Issue Tracking |
| https://go.dev/issue/73702 | [email protected] | Issue Tracking |
| https://groups.google.com/g/golang-announce/c/ufZ8WpEsA3A | [email protected] | Mailing List |
| https://pkg.go.dev/vuln/GO-2025-3750 | [email protected] | Vendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-59 | Improper Link Resolution Before File Access ('Link Following') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| golang go | < 1.23.10 >= 1.24.0, < 1.24.4 |
CPE
Remediation
| |
| microsoft windows | All versions |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Aug 8, 2025 | Initial Analysis | [email protected] |
| Jun 11, 2025 | New CVE Received | [email protected] |
| Jun 11, 2025 | CVE Modified | CISA-ADP |