GO-2022-0533

Path traversal via Clean on Windows in path/filepath

At a glance

Published
Updated
CVE
CVE-2022-29804
Aliases
BIT-golang-2022-29804

Description

On Windows, the filepath.Clean function can convert certain invalid paths to valid, absolute paths, potentially allowing a directory traversal attack. For example, Clean(".\c:") returns "c:".

Affected packages

PackageVersions
Go · stdlibintroduced 0, fixed 1.17.11, introduced 1.18.0-0, fixed 1.18.3

References

Sources

SourceLicence
OSV.devCC-BY 4.0 — Go Vulnerability Database