CVE-2023-45283: Vulnerability in golang package

golang Updated 02 Oct 2025

Summary

06/03/2024
Yes i
High
Not published

CVE-2023-45283: Insecure parsing of Windows paths with a \??\ prefix in path/filepath. Affects golang 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

The same CVE-2023-45283 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The golang package is a popular open-source programming language that is widely used for developing efficient and reliable software applications. It provides a rich set of libraries and tools for various purposes, including file handling and path manipulation. However, a vulnerability has been discovered in the filepath package of golang, which can lead to potential security risks on Windows systems.

Vulnerability Detail

The filepath package in golang does not properly handle paths with a ??\ prefix on Windows systems. This prefix is used to represent Root Local Device paths, which can access arbitrary locations on the system. The vulnerability allows an attacker to manipulate file paths and potentially gain unauthorized access to sensitive files or execute malicious code. The Clean and Join functions in the filepath package are affected by this vulnerability. Additionally, the behavior of IsAbs and VolumeName functions has been impacted by recent updates to Go versions 1.20.11 and 1.21.4.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 1.20.11 1.20.11
  • >= 1.21.0-0, < 1.21.4 1.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

If updating the golang package is not immediately feasible, a workaround can be implemented by manually modifying the affected functions in the filepath package. The Clean function should be modified to convert rooted paths with the ??\ prefix to .??, and the Join function should convert the path elements to .??. However, it is strongly recommended to apply the official fix by updating the package as soon as possible.

Conclusion

The golang package is susceptible to a vulnerability in the filepath package, which can lead to unauthorized access to files or execution of malicious code on Windows systems. It is crucial to update the package to version 1.20.11 or higher to fix this vulnerability. Developers should also review their code and ensure secure path manipulation practices. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for golang →

Share this vulnerability

FAQ

This vulnerability allows an attacker to manipulate file paths and potentially gain unauthorized access to sensitive files or execute malicious code on Windows systems.

Versions prior to 1.20.11 and versions 1.21.0-0 to 1.21.4 of the golang package are affected by this vulnerability.

No, this vulnerability specifically affects Windows systems.

At the time of this report, there are no known public exploits for this vulnerability. However, it is important to apply the fix as soon as possible to mitigate any potential risks.

In addition to updating the golang package, it is recommended to follow secure coding practices and avoid using insecure path manipulation techniques in your code. Always validate and sanitize user input to prevent any potential path traversal attacks.

Related vulnerabilities

Recent vulnerabilities recorded for golang.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 1.20.11 1.20.11
  • >= 1.21.0-0, < 1.21.4 1.21.4

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback