ADVISORIES

Go Vulnerability Database

GO-2022-0533

Path traversal via Clean on Windows in path/filepath

Details

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

EcosystemPackageAffected versions
Gostdlib
All versions before 1.17.11 (fixed in 1.17.11)
From 1.18.0-0 before 1.18.3 (fixed in 1.18.3)

References