CVE-2023-45284: Incorrect detection of reserved device names on Windows in path/filepath
Summary
CVE-2023-45284: Incorrect detection of reserved device names on Windows in path/filepath. Affects stdlib across 2 version ranges.
< 1.20.11
>= 1.21.0-0, < 1.21.4
Fixed in 1.20.11 or 1.21.4, depending on the release line you run. How to fix ↓
Also tracked for
- golang · Bitnami
- golang-1.15 · Debian:11
The same CVE-2023-45284 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The stdlib package in the Go ecosystem provides a collection of standard libraries for the Go programming language. One of the packages included is path/filepath, which offers functions for manipulating file paths. This vulnerability affects the IsLocal function within the path/filepath package on Windows systems. The IsLocal function is responsible for detecting whether a given file path refers to a local device or not.
Vulnerability Detail
The IsLocal function in path/filepath on Windows fails to correctly detect reserved device names in certain cases. Specifically, it incorrectly identifies reserved names followed by spaces, such as "COM1 ", and reserved names "COM" and "LPT" followed by superscript 1, 2, or 3, as local. This incorrect detection can lead to security issues if the application relies on the IsLocal function to determine the nature of a file path. An attacker could potentially exploit this vulnerability to perform unauthorized actions on reserved devices.
How To Fix
Latest published version: go1.25.5 as of 22 Oct 2026
go get stdlib@vgo1.25.5
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 1.20.111.20.11go get stdlib@v1.20.11 -
>= 1.21.0-0, < 1.21.41.21.4go get stdlib@v1.21.4
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability.
Conclusion
In conclusion, the IsLocal function in the path/filepath package of the Go stdlib on Windows systems incorrectly detects reserved device names in certain cases. This vulnerability can be mitigated by updating to Go version 1.20.11 or 1.21.4. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for stdlib →
FAQ
This vulnerability can potentially allow attackers to perform unauthorized actions on reserved devices by exploiting the incorrect detection of reserved device names.
Versions prior to 1.20.11 and 1.21.4 of the Go programming language are affected by this vulnerability.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. The Vulert Playground allows you to analyze your application without requiring access to the code or installation.
Yes, updating your Go version to at least 1.20.11 or 1.21.4 will fix this vulnerability.
You can find more information about this vulnerability in the Go vulnerability database: https://pkg.go.dev/vuln/GO-2023-2186
References
Related vulnerabilities
Recent vulnerabilities recorded for stdlib.