{"id":"GHSA-qrqq-9c63-xfrg","aliases":["GHSA-qrqq-9c63-xfrg","RUSTSEC-2022-0043"],"related":[],"kind":"vulnerability","state":"published","title":"tower-http's improper validation of Windows paths could lead to directory traversal attack","summary":"`tower_http::services::fs::ServeDir` didn't correctly validate Windows paths, meaning paths like `/foo/bar/c:/windows/web/screen/img101.png` would be allowed and respond with the contents of `c:/windows/web/screen/img101.png`. Thus users could potentially read files anywhere on the filesystem.\n\nThis only impacts Windows. Linux and other unix likes are not impacted by this.\n\nSee [tower-http#204] for more details.\n\n[tower-http#204]: https://github.com/tower-rs/tower-http/pull/204","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"`tower_http::services::fs::ServeDir` didn't correctly validate Windows paths, meaning paths like `/foo/bar/c:/windows/web/screen/img101.png` would be allowed and respond with the contents of `c:/windows/web/screen/img101.png`. Thus users could potentially read files anywhere on the filesystem.\n\nThis only impacts Windows. Linux and other unix likes are not impacted by this.\n\nSee [tower-http#204] for more details.\n\n[tower-http#204]: https://github.com/tower-rs/tower-http/pull/204","format":"markdown","source":"ghsa"},{"lang":"en","text":"`tower_http::services::fs::ServeDir` didn't correctly validate Windows paths\nmeaning paths like `/foo/bar/c:/windows/web/screen/img101.png` would be allowed\nand respond with the contents of `c:/windows/web/screen/img101.png`. Thus users\ncould potentially read files anywhere on the filesystem.\n\nThis only impacts Windows. Linux and other unix likes are not impacted by this.\n\nSee [tower-http#204] for more details.\n\n[tower-http#204]: https://github.com/tower-rs/tower-http/pull/204","format":"markdown","source":"rustsec"}],"published":"2022-01-21T12:00:00.000Z","modified":"2023-11-08T04:22:23.525Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0.2.0","status":"affected","fixed":"0.2.1"}],"ecosystem":"crates.io","package":"tower-http","purl":"pkg:cargo/tower-http","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.1.3"}],"ecosystem":"crates.io","package":"tower-http","purl":"pkg:cargo/tower-http","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.1.3"},{"type":"semver","introduced":"0.2.0","status":"affected","fixed":"0.2.1"}],"ecosystem":"crates.io","package":"tower-http","purl":"pkg:cargo/tower-http","source":"rustsec"}],"references":[{"url":"https://github.com/tower-rs/tower-http/pull/204","tags":["web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/tower-rs/tower-http","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2022-0043.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/tower-http","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qrqq-9c63-xfrg","url":"https://github.com/advisories/GHSA-qrqq-9c63-xfrg","licence":"CC-BY-4.0","modified":"2023-11-08T04:22:23.525Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2022-0043","url":"https://rustsec.org/advisories/RUSTSEC-2022-0043.html","licence":"CC0-1.0","modified":"2023-11-08T04:22:23.525Z"}],"updatedAt":"2026-11-25T22:56:43.105Z"}