Vulnerability · Published Jun 11, 2025 · Assigned by Go

CVE-2025-0913Inconsistent handling of O_CREATE|O_EXCL on Unix and Windows in os in syscall

Medium 5.5

In plain English

A medium-severity security flaw in os from Go standard library. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 26% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.5Medium
Exploit odds (30 days)0.3%top 74.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.22go1.24.4-r0ALPINE-CVE-2025-0913
Alpine:v3.23go1.24.4-r0ALPINE-CVE-2025-0913
Alpine:v3.24go1.24.4-r0ALPINE-CVE-2025-0913
Gostdlib1.23.10, 1.24.4GO-2025-3750
Ubuntu:22.04:LTSgolang-1.13no fix listedUBUNTU-CVE-2025-0913
Ubuntu:22.04:LTSgolang-1.17no fix listedUBUNTU-CVE-2025-0913
Ubuntu:22.04:LTSgolang-1.18no fix listedUBUNTU-CVE-2025-0913
Ubuntu:22.04:LTSgolang-1.20no fix listedUBUNTU-CVE-2025-0913
Ubuntu:22.04:LTSgolang-1.21no fix listedUBUNTU-CVE-2025-0913
Ubuntu:24.04:LTSgolang-1.21no fix listedUBUNTU-CVE-2025-0913
Ubuntu:22.04:LTSgolang-1.22no fix listedUBUNTU-CVE-2025-0913
Ubuntu:24.04:LTSgolang-1.22no fix listedUBUNTU-CVE-2025-0913
Ubuntu:22.04:LTSgolang-1.23no fix listedUBUNTU-CVE-2025-0913
Ubuntu:24.04:LTSgolang-1.23no fix listedUBUNTU-CVE-2025-0913
Ubuntu:25.10golang-1.23no fix listedUBUNTU-CVE-2025-0913
Ubuntu:26.04:LTSgolang-1.23no fix listedUBUNTU-CVE-2025-0913
Ubuntu:22.04:LTSgolang-1.24no fix listedUBUNTU-CVE-2025-0913
Ubuntu:24.04:LTSgolang-1.24no fix listedUBUNTU-CVE-2025-0913
Ubuntu:25.10golang-1.24no fix listedUBUNTU-CVE-2025-0913
Ubuntu:26.04:LTSgolang-1.24no fix listedUBUNTU-CVE-2025-0913

Affected products (as reported)

VendorProductVersions
Go standard library syscall 0 – before 1.23.101.24.0-0 – before 1.24.4
Go standard library os 0 – before 1.23.101.24.0-0 – before 1.24.4

References