CVE-2025-0913
Golang vulnerability analysis and mitigation

Overview

CVE-2025-0913 is a security vulnerability discovered in Go programming language's os.OpenFile function, reported by Junyoung Park and Dong-uk Kim of KAIST Hacking Lab. The vulnerability stems from inconsistent handling of OCREATE|OEXCL flags between Unix and Windows systems when dealing with dangling symlinks. The issue was disclosed on June 11, 2025, and affects Go versions before 1.23.10 and before 1.24.4 (Go Announce).

Technical details

The vulnerability exists in the os.OpenFile function when used with OCREATE and OEXCL flags. On Unix systems, OpenFile with these flags never follows symlinks, while on Windows, when the target path was a symlink to a nonexistent location, OpenFile would create a file in that location. This inconsistency in behavior between operating systems could potentially lead to security issues. The vulnerability has been assigned a CVSS 3.1 Base Score of 5.5 (MEDIUM) with vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N (NVD).

Impact

The vulnerability could potentially be exploited to create files in unintended locations on Windows systems, leading to security implications when the OCREATE and OEXCL flags are used together with symlinks. The CVSS score indicates high impact on integrity but no impact on confidentiality or availability (NVD).

Mitigation and workarounds

The vulnerability has been fixed in Go versions 1.23.10 and 1.24.4. The fix ensures that OpenFile always returns an error when the OCREATE and OEXCL flags are both set and the target path is a symlink, providing consistent behavior across all operating systems (Go Announce).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management