
Cloud Vulnerability DB
A community-led vulnerabilities database
A vulnerability was discovered in the golang package's JoinPath and URL.JoinPath functions, identified as CVE-2022-32190. The issue was found where these functions failed to remove '../' path elements appended to a relative path. For example, JoinPath('https://go.dev', '../go') would return 'https://go.dev/../go', contradicting the documentation which stated that '../' path elements should be removed from the result. The vulnerability was discovered in Go version 1.19.0 and was fixed in version 1.19.1 (Golang Announce, Go Issue).
The vulnerability affects the net/url package in Go, specifically the JoinPath and URL.JoinPath functions. The issue manifests when handling relative path components, where the functions fail to properly clean up '../' path elements in certain circumstances. This behavior occurs particularly when the path elements are appended to a domain that is not terminated by a slash. For instance, the function produces different results depending on whether the first component ends with a slash: JoinPath('https://go.dev', '../x') returns 'https://go.dev/../x', while JoinPath('https://go.dev/', '../x') returns 'https://go.dev/x' (Go Issue).
The vulnerability could potentially lead to directory traversal attacks. The inconsistent behavior of path handling could be exploited in scenarios where path manipulation is security-critical. The impact is particularly concerning as it contradicts the documented behavior of the JoinPath function, which explicitly states that '../' path elements should be removed from the result (Go Issue).
The vulnerability was fixed in Go versions 1.19.1 and 1.18.6. Users are recommended to upgrade to these or later versions to address the issue. The fix ensures consistent handling of relative path components regardless of whether the first component ends with a slash (Golang Announce).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."