CVE-2025-0913
Inconsistent handling of O_CREATE|O_EXCL on Unix and Windows in os in syscall
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.
INFO
Published Date :
June 11, 2025, 6:15 p.m.
Last Modified :
Aug. 8, 2025, 2:53 p.m.
Remotely Exploit :
No
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source | 
|---|---|---|---|---|---|---|
| CVSS 3.1 | MEDIUM | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | 
Solution
- Update to a version that fixes symlink handling.
 - Test file operations involving symlinks.
 - Review related file access controls.
 
Public PoC/Exploit Available at Github
                                            CVE-2025-0913 has a 5 public
                                            PoC/Exploit available at Github.
                                            Go to the Public Exploits tab to see the list.
                                        
References to Advisories, Solutions, and Tools
                                            Here, you will find a curated list of external links that provide in-depth
                                            information, practical solutions, and valuable tools related to
                                            CVE-2025-0913.
                                        
| URL | Resource | 
|---|---|
| https://go.dev/cl/672396 | Issue Tracking | 
| https://go.dev/issue/73702 | Issue Tracking | 
| https://groups.google.com/g/golang-announce/c/ufZ8WpEsA3A | Mailing List | 
| https://pkg.go.dev/vuln/GO-2025-3750 | Vendor Advisory | 
CWE - Common Weakness Enumeration
            While CVE identifies
            specific instances of vulnerabilities, CWE categorizes the common flaws or
            weaknesses that can lead to vulnerabilities. CVE-2025-0913 is
            associated with the following CWEs:
        
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
            (CAPEC)
            stores attack patterns, which are descriptions of the common attributes and
            approaches employed by adversaries to exploit the CVE-2025-0913
            weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Go CLI tool for vulnerability exploitability analysis with AI-powered enrichment
Python Dockerfile Go
A repository demonstrating how to scan Terraform Providers from the public internet.
Shell
A powerful Kubernetes debugging tool that enables network capture, command execution, and file operations across multiple pods and nodes simultaneously through privileged debug pods.
Shell
None
Dockerfile
Contains the build files for https://hub.docker.com/repository/docker/tamulibraries/metadb/
Dockerfile Shell
Results are limited to the first 15 repositories due to potential performance issues.
			The following list is the news that have been mention
			CVE-2025-0913 vulnerability anywhere in the article.
		
                The following table lists the changes that have been made to the
                CVE-2025-0913 vulnerability over time.
            
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
- 
                            
Initial Analysis by [email protected]
Aug. 08, 2025
Action Type Old Value New Value Added CWE CWE-59 Added CPE Configuration AND OR *cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* versions up to (excluding) 1.23.10 *cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* versions from (including) 1.24.0 up to (excluding) 1.24.4 OR cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:* Added Reference Type Go Project: https://go.dev/cl/672396 Types: Issue Tracking Added Reference Type Go Project: https://go.dev/issue/73702 Types: Issue Tracking Added Reference Type Go Project: https://groups.google.com/g/golang-announce/c/ufZ8WpEsA3A Types: Mailing List Added Reference Type Go Project: https://pkg.go.dev/vuln/GO-2025-3750 Types: Vendor Advisory  - 
                            
New CVE Received by [email protected]
Jun. 11, 2025
Action Type Old Value New Value Added 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. Added Reference https://go.dev/cl/672396 Added Reference https://go.dev/issue/73702 Added Reference https://groups.google.com/g/golang-announce/c/ufZ8WpEsA3A Added Reference https://pkg.go.dev/vuln/GO-2025-3750  - 
                            
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 11, 2025
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N