{"id":"GHSA-7p7c-pvvx-2vx3","aliases":["RUSTSEC-2022-0069"],"status":"published","title":"hyper-staticfile's improper validation of Windows paths could lead to directory traversal attack","description":"Path resolution in `hyper-staticfile` 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.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-22"],"published":"2022-11-30T12:00:00Z","modified":"2023-11-08T04:16:54Z","fixes":[{"ecosystem":"crates.io","package":"hyper-staticfile","fixed_in":["0.9.2","0.10.0-alpha.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"hyper-staticfile","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.2"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"hyper-staticfile","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.10.0-alpha.1"},{"last_affected":"0.10.0-alpha.1"},{"fixed":"0.10.0-alpha.2"}]}],"versions":["0.10.0-alpha.1"]},{"source":"osv","ecosystem":"crates.io","package":"hyper-staticfile","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.9.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"hyper-staticfile","ranges":[{"type":"SEMVER","events":[{"introduced":"0.10.0-alpha.1"},{"fixed":"0.10.0-alpha.2"}]}],"versions":["0.10.0-alpha.1"]},{"source":"osv","ecosystem":"crates.io","package":"hyper-staticfile","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.9.2"},{"introduced":"0.10.0-0"},{"fixed":"0.10.0-alpha.2"}]}]}],"references":[{"url":"https://github.com/stephank/hyper-staticfile/issues/35","tags":["web","report"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2022-0069.html","tags":["web","advisory"]},{"url":"https://github.com/stephank/hyper-staticfile/pull/36","tags":["web"]},{"url":"https://github.com/stephank/hyper-staticfile/commit/1e40e31d64bc6b32e595d24074092dcf84410b2b","tags":["web"]},{"url":"https://github.com/advisories/GHSA-7p7c-pvvx-2vx3"},{"url":"https://github.com/stephank/hyper-staticfile","tags":["package"]},{"url":"https://crates.io/crates/hyper-staticfile","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-7p7c-pvvx-2vx3","title":"hyper-staticfile's improper validation of Windows paths could lead to directory traversal attack","description":"Path resolution in `hyper-staticfile` 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","status":"published","published":"2022-12-05T22:03:46Z","modified":"2023-03-30T23:48:37Z","cwes":["CWE-22"],"updated_at":"2026-11-02T14:36:48.905887Z"}],"osv":[{"id":"GHSA-7p7c-pvvx-2vx3","title":"hyper-staticfile's improper validation of Windows paths could lead to directory traversal attack","description":"Path resolution in `hyper-staticfile` 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","status":"published","published":"2022-12-05T22:03:46Z","modified":"2023-11-08T04:16:54.984322Z","cwes":["CWE-22"],"updated_at":"2026-11-02T15:46:41.349637Z"},{"id":"RUSTSEC-2022-0069","title":"Improper validation of Windows paths could lead to directory traversal attack","description":"Path resolution in `hyper-staticfile` 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.","status":"published","published":"2022-11-30T12:00:00Z","modified":"2023-11-08T04:16:54.984322Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
