{"id":"GHSA-wwh2-r387-g5rm","aliases":[],"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. This only impacts Windows. Linux and other unix likes are not impacted by this.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-22"],"published":"2022-06-17T00:26:05Z","modified":"2023-06-13T22:06:25Z","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"},{"fixed":"0.2.1"}]}]},{"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"}]}]},{"source":"osv","ecosystem":"crates.io","package":"tower-http","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.1.3"}]}]}],"references":[{"url":"https://github.com/tower-rs/tower-http/pull/204","tags":["web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0135.html","tags":["web"]},{"url":"https://github.com/advisories/GHSA-wwh2-r387-g5rm"},{"url":"https://github.com/tower-rs/tower-http","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-wwh2-r387-g5rm","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. This only impacts Windows. Linux and other unix likes are not impacted by this.","status":"published","published":"2022-06-17T00:26:05Z","modified":"2023-06-13T22:06:25Z","cwes":["CWE-22"],"updated_at":"2026-11-02T14:36:54.225318Z"}],"osv":[{"id":"GHSA-wwh2-r387-g5rm","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. This only impacts Windows. Linux and other unix likes are not impacted by this.","status":"published","published":"2022-06-17T00:26:05Z","modified":"2023-06-13T22:06:25Z","cwes":["CWE-22"],"updated_at":"2026-11-02T15:46:59.131095Z"}]}}
