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.
Metrics
Affected Vendors & Products
References
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
|
epss
|
Wed, 11 Jun 2025 18:15:00 +0000
Type | Values Removed | Values Added |
---|---|---|
Metrics |
cvssV3_1
|
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 |
|

Status: PUBLISHED
Assigner: Go
Published: 2025-06-11T17:17:25.606Z
Updated: 2025-06-11T17:37:52.111Z
Reserved: 2025-01-30T21:52:33.447Z
Link: CVE-2025-0913

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

Status : Analyzed
Published: 2025-06-11T18:15:24.627
Modified: 2025-08-08T14:53:03.550
Link: CVE-2025-0913

No data.