{"id":"GHSA-qrqq-9c63-xfrg","aliases":["RUSTSEC-2022-0043"],"status":"published","title":"tower-http's improper validation of Windows paths could lead to directory traversal attack","description":"`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","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2022-01-21T12:00:00Z","modified":"2023-11-08T04:22:23Z","fixes":[{"ecosystem":"crates.io","package":"tower-http","fixed_in":["0.2.1","0.1.3"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"tower-http","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.2.0"},{"last_affected":"0.2.0"},{"fixed":"0.2.1"}]}],"versions":["0.2.0"]},{"source":"ghsa","ecosystem":"crates.io","package":"tower-http","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.3"}]}]},{"source":"osv","ecosystem":"crates.io","package":"tower-http","ranges":[{"type":"SEMVER","events":[{"introduced":"0.2.0"},{"fixed":"0.2.1"}]}],"versions":["0.2.0"]},{"source":"osv","ecosystem":"crates.io","package":"tower-http","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.1.3"}]}]},{"source":"osv","ecosystem":"crates.io","package":"tower-http","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.1.3"},{"introduced":"0.2.0"},{"fixed":"0.2.1"}]}]}],"references":[{"url":"https://github.com/tower-rs/tower-http/pull/204","tags":["web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2022-0043.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-qrqq-9c63-xfrg"},{"url":"https://github.com/tower-rs/tower-http","tags":["package"]},{"url":"https://crates.io/crates/tower-http","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-qrqq-9c63-xfrg","title":"tower-http's improper validation of Windows paths could lead to directory traversal attack","description":"`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\n","status":"published","published":"2022-08-11T15:36:42Z","modified":"2023-06-13T22:12:22Z","updated_at":"2026-11-02T14:36:54.225318Z"}],"osv":[{"id":"GHSA-qrqq-9c63-xfrg","title":"tower-http's improper validation of Windows paths could lead to directory traversal attack","description":"`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\n","status":"published","published":"2022-08-11T15:36:42Z","modified":"2023-11-08T04:22:23.525783Z","updated_at":"2026-11-02T15:46:54.760124Z"},{"id":"RUSTSEC-2022-0043","title":"Improper validation of Windows paths could lead to directory traversal attack","description":"`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","status":"published","published":"2022-01-21T12:00:00Z","modified":"2023-11-08T04:22:23.525783Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
