CVE-2025-0913
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.
How to fix
- golang go1.23.10, 1.24.4 or later
- stdlib1.23.10, 1.24.4 or later
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| golang go | v < 1.23.10, 1.24.0 ≤ v < 1.24.4 | 1.23.10, 1.24.4 |
| stdlibGo | v < 1.23.10, 1.24.0-0 ≤ v < 1.24.4 | 1.23.10, 1.24.4 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.