golang
cpe:2.3:a:golang:go:*:*:*:*:*:*:*
- < go1.23.10
- >= go1.24.0-0, < go1.24.4
A vulnerability exists in the Go programming language's standard library, specifically in the 'os' and 'syscall' packages, prior to version 1.24.4. The issue arises from inconsistent behavior of the 'OpenFile' function when using the 'O_CREATE' and 'O_EXCL' flags in conjunction with dangling symbolic links. On Unix systems, 'OpenFile' correctly fails when the target is a symlink, as per the expected behavior outlined in the manpage for the 'open' system call. However, on Windows, 'OpenFile' would erroneously create a file at the location of a dangling symlink, leading to potential unintended file creation. This vulnerability has been addressed in Go version 1.24.4, which ensures that 'OpenFile' returns an error when both 'O_CREATE' and 'O_EXCL' are set and the target is a symlink.
Exploitation of this vulnerability could lead to unintended file creation on Windows systems, where 'OpenFile' would create a file at the location of a dangling symlink. This behavior could be exploited to manipulate file creation in a way that may not be intended by the user or application.
The vulnerability can be reproduced by creating a dangling symlink on a Windows system and then using the 'OpenFile' function with the 'O_CREATE' and 'O_EXCL' flags. The 'OpenFile' function will incorrectly create a file at the location of the dangling symlink, contrary to the expected behavior on Unix systems, where the operation would fail.
Users can upgrade to Go version 1.24.4 or 1.23.10, both of which include the necessary fix. Instructions for downloading these versions are available on the Go website.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.