Advisory

GO-2023-1568

Also known as: BIT-golang-2022-41722, CVE-2022-41722

Summary

Path traversal on Windows in path/filepath

Details

A path traversal vulnerability exists in filepath.Clean on Windows.

On Windows, the filepath.Clean function could transform an invalid path such as "a/../c:/b" into the valid path "c:\b". This transformation of a relative (if invalid) path into an absolute path could enable a directory traversal attack.

After fix, the filepath.Clean function transforms this path into the relative (but still invalid) path ".\c:\b".

Severity

Not rated by the source.

Dates

Published
2023-02-16 19:49 UTC
Modified
2026-02-04 02:54 UTC

Affected packages and fixes

stdlib

Go · All systems

Affected

  • introduced 0, fixed 1.19.6, introduced 1.20.0-0, fixed 1.20.1 (semver)

Fixed versions

1.19.6, 1.20.1

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences