CVE-2023-45283

Insecure parsing of Windows paths with a \??\ prefix in path/filepath

Description

The filepath package does not recognize paths with a \??\ prefix as special. On Windows, a path beginning with \??\ is a Root Local Device path equivalent to a path beginning with \\?\. Paths with a \??\ prefix may be used to access arbitrary locations on the system. For example, the path \??\c:\x is equivalent to the more common path c:\x. Before fix, Clean could convert a rooted path such as \a\..\??\b into the root local device path \??\b. Clean will now convert this to .\??\b. Similarly, Join(\, ??, b) could convert a seemingly innocent sequence of path elements into the root local device path \??\b. Join will now convert this to \.\??\b. In addition, with fix, IsAbs now correctly reports paths beginning with \??\ as absolute, and VolumeName correctly reports the \??\ prefix as a volume name. UPDATE: Go 1.20.11 and Go 1.21.4 inadvertently changed the definition of the volume name in Windows paths starting with \?, resulting in filepath.Clean(\?\c:) returning \?\c: rather than \?\c:\ (among other effects). The previous behavior has been restored.

Category

7.5
CVSS
Severity: High
CVSS 3.1 •
EPSS 0.06%
Vendor Advisory go.dev Vendor Advisory go.dev Vendor Advisory google.com Vendor Advisory go.dev
Affected: Go standard library path/filepath
Affected: Go standard library internal/safefilepath
Affected: Go standard library path/filepath
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2023-45283?
CVE-2023-45283 has been scored as a high severity vulnerability.
How to fix CVE-2023-45283?
To fix CVE-2023-45283, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2023-45283 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2023-45283 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2023-45283?
CVE-2023-45283 affects Go standard library path/filepath, Go standard library internal/safefilepath, Go standard library path/filepath.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.