JoinPath and URL.JoinPath do not remove ../ path elements appended to a relative path. For example, JoinPath("https://go.dev", "../go") returns the URL "https://go.dev/../go", despite the JoinPath documentation stating that ../ path elements are removed from the result.
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Link | Tags |
---|---|
https://groups.google.com/g/golang-announce/c/x49AQzIVX-s | third party advisory mailing list |
https://go.dev/issue/54385 | patch vendor advisory issue tracking |
https://go.dev/cl/423514 | patch release notes |
https://pkg.go.dev/vuln/GO-2022-0988 | patch vendor advisory issue tracking |