CVE-2025-0913

Medium

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.

SeverityMedium
CVSS5.5
Exploit probability—
ProductGo
PublishedJun 11, 2025
First seenJun 11, 2025

How to fix

Update
  • golang go1.23.10, 1.24.4 or later
  • stdlib1.23.10, 1.24.4 or later

Affected products

ProductAffected versionsFixed in
golang gov < 1.23.10, 1.24.0 ≤ v < 1.24.41.23.10, 1.24.4
stdlibGov < 1.23.10, 1.24.0-0 ≤ v < 1.24.41.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.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.