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.
Published: 2025-06-11
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

No vendor fix or workaround currently provided.

Additional remediation guidance may be available on OpenCVE Cloud.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
EUVD EUVD EUVD-2025-18139 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.
History

Fri, 08 Aug 2025 15:00:00 +0000

Type Values Removed Values Added
First Time appeared Golang
Golang go
Microsoft
Microsoft windows
Weaknesses CWE-59
CPEs cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*
Vendors & Products Golang
Golang go
Microsoft
Microsoft windows

Sun, 13 Jul 2025 13:45:00 +0000

Type Values Removed Values Added
Metrics epss

{'score': 0.00013}

epss

{'score': 0.00015}


Wed, 11 Jun 2025 18:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 11 Jun 2025 17:30:00 +0000

Type Values Removed Values 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.
Title Inconsistent handling of O_CREATE|O_EXCL on Unix and Windows in os in syscall
References

cve-icon MITRE

Status: PUBLISHED

Assigner: Go

Published:

Updated: 2025-06-11T17:37:52.111Z

Reserved: 2025-01-30T21:52:33.447Z

Link: CVE-2025-0913

cve-icon Vulnrichment

Updated: 2025-06-11T17:37:22.578Z

cve-icon NVD

Status : Analyzed

Published: 2025-06-11T18:15:24.627

Modified: 2025-08-08T14:53:03.550

Link: CVE-2025-0913

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses