Skip to content

path/filepath: path traversal in filepath.Clean on Windows (CVE-2022-41722) #57274

@neild

Description

@neild

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. The filepath.Clean function will now transform this path into the relative (but still invalid) path .\c:\b.

Thanks to RyotaK (https://ryotak.net/) for reporting this issue.

This is a PRIVATE issue for CVE-2022-41722, tracked in http://b/261991454 and fixed by http://tg/1675249.

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.Security

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions