CVE-2023-45283

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

No CVSS score yet EPSS 3.34%

Published 9 Nov 2023 Updated 13 Feb 2025 CNA: Go

Check your servers for CVE-2023-45283

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-45283 affects a package, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Exploitation

EPSS 3.34%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 88.9% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
path/filepath
package path/filepath
affected before 1.20.11
affected from 1.21.0-0, before 1.21.4
Other versions: unaffected
internal/safefilepath
package internal/safefilepath
affected before 1.20.11
affected from 1.21.0-0, before 1.21.4
Other versions: unaffected
path/filepath
package path/filepath
affected from 1.20.11, before 1.20.12
affected from 1.21.4, before 1.21.5
Other versions: unaffected

Is my server affected?

Find the installed version of the package (replace PACKAGE with its name) and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i PACKAGE
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2023-45283 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2023-45283

RHEL, Rocky, Alma, Fedora

rpm -q PACKAGE
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2023-45283

Alpine

apk list --installed | grep -i PACKAGE

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2023-45283
trivy image --scanners vuln IMAGE | grep CVE-2023-45283

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2023-45283 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.