CVE-2022-41722: Path traversal on Windows in path/filepath
A flaw was found in Go, where it could allow a remote attacker to traverse directories on the system, caused by improper validation of user requests by the filepath.Clean on Windows package. This flaw allows an attacker to send a specially-crafted URL request containing "dot dot" sequences (/../) to view arbitrary files on the system.
Other sources
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".
Golang Go could allow a remote attacker to traverse directories on the system, caused by a flaw in the filepath.Clean function. An attacker could send a specially-crafted URL request containing "dot dot" sequences (/../) to view arbitrary files on the system.
— IBM
Path traversal on Windows in path/filepath
— Microsoft
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/openshift-clientsto a version that resolves this vulnerability.Fixed in 0:4.13.0-202305291355.p0.g1024efc.assembly.stream.el8 - Upgrade
Upgrade
redhat/Goto a version that resolves this vulnerability.Fixed in 1.20.1 - Upgrade
Upgrade
redhat/Goto a version that resolves this vulnerability.Fixed in 1.19.6
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the vulnerability ID for this flaw?
The vulnerability ID for this flaw is CVE-2022-41722.
What is the severity of CVE-2022-41722?
The severity of CVE-2022-41722 is high with a CVSS score of 7.5.
How does the vulnerability impact the system?
The vulnerability allows a remote attacker to traverse directories on the system, potentially enabling a directory traversal attack.
Which software versions are affected by CVE-2022-41722?
The affected software versions include Go 1.19.6, Go 1.20.0, and openshift-clients 4.13.0-202305291355.p0.g1024efc.assembly.stream.el8.
How can I fix CVE-2022-41722?
To fix CVE-2022-41722, update to Go version 1.19.6 or 1.20.1, or update openshift-clients to version 4.13.0-202305291355.p0.g1024efc.assembly.stream.el8.