// For flags

CVE-2023-45283

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

Severity Score

7.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

El paquete filepath no reconoce las rutas con el prefijo \??\ como especiales. En Windows, una ruta que comienza con \??\ es una ruta de dispositivo local raíz equivalente a una ruta que comienza con \\?\. Se pueden utilizar rutas con un prefijo \??\ para acceder a ubicaciones arbitrarias en el sistema. Por ejemplo, la ruta \??\c:\x es equivalente a la ruta más común c:\x. Antes de la solución, Clean podía convertir una ruta raíz como \a\..\??\b en la ruta raíz del dispositivo local \??\b. Clean ahora convertirá esto a .\??\b. De manera similar, Join(\, ??, b) podría convertir una secuencia aparentemente inocente de elementos de ruta en la ruta del dispositivo local raíz \??\b. Unirse ahora convertirá esto a \.\??\b. Además, con la solución, IsAbs ahora informa correctamente las rutas que comienzan con \??\ como absolutas, y VolumeName informa correctamente el prefijo \??\ como nombre de volumen.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2023-10-06 CVE Reserved
  • 2023-11-09 CVE Published
  • 2024-08-02 CVE Updated
  • 2024-11-15 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Golang
Search vendor "Golang"
Go
Search vendor "Golang" for product "Go"
< 1.20.11
Search vendor "Golang" for product "Go" and version " < 1.20.11"
-
Affected
in Microsoft
Search vendor "Microsoft"
Windows
Search vendor "Microsoft" for product "Windows"
--
Safe
Golang
Search vendor "Golang"
Go
Search vendor "Golang" for product "Go"
>= 1.21.0-0 < 1.21.4
Search vendor "Golang" for product "Go" and version " >= 1.21.0-0 < 1.21.4"
-
Affected
in Microsoft
Search vendor "Microsoft"
Windows
Search vendor "Microsoft" for product "Windows"
--
Safe