{"id":"GHSA-5wvv-q5fv-2388","aliases":["GHSA-5wvv-q5fv-2388","RUSTSEC-2022-0072"],"related":[],"kind":"vulnerability","state":"published","title":"hyper-staticfile's location header incorporates user input, allowing open redirect","summary":"When `hyper-staticfile` performs a redirect for a directory request (e.g. a request for `/dir` that redirects to `/dir/`), the `Location` header value was derived from user input (the request path), simply appending a slash. The intent was to perform an origin-relative redirect, but specific inputs allowed performing a scheme-relative redirect instead.\n\nAn attacker could craft a special URL that would appear to be for the correct domain, but immediately redirects to a malicious domain. Such a URL can benefit phishing attacks, for example an innocent looking link in an email.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"When `hyper-staticfile` performs a redirect for a directory request (e.g. a request for `/dir` that redirects to `/dir/`), the `Location` header value was derived from user input (the request path), simply appending a slash. The intent was to perform an origin-relative redirect, but specific inputs allowed performing a scheme-relative redirect instead.\n\nAn attacker could craft a special URL that would appear to be for the correct domain, but immediately redirects to a malicious domain. Such a URL can benefit phishing attacks, for example an innocent looking link in an email.","format":"markdown","source":"ghsa"}],"published":"2022-12-23T12:00:00.000Z","modified":"2023-11-08T04:15:57.217Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.9.4"}],"ecosystem":"crates.io","package":"hyper-staticfile","purl":"pkg:cargo/hyper-staticfile","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.10.0-alpha.1","status":"affected","fixed":"0.10.0-alpha.5"}],"ecosystem":"crates.io","package":"hyper-staticfile","purl":"pkg:cargo/hyper-staticfile","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.9.4"},{"type":"semver","introduced":"0.10.0-0","status":"affected","fixed":"0.10.0-alpha.5"}],"ecosystem":"crates.io","package":"hyper-staticfile","purl":"pkg:cargo/hyper-staticfile","source":"rustsec"}],"references":[{"url":"https://github.com/stephank/hyper-staticfile/commit/4db4afb811c553bc3d54a01a9985b9e6dfc5a115","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/stephank/hyper-staticfile/commit/f12cadc6666c6f555d29725f5bc45da2103f24ea","tags":["web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/stephank/hyper-staticfile","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2022-0072.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/hyper-staticfile","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5wvv-q5fv-2388","url":"https://github.com/advisories/GHSA-5wvv-q5fv-2388","licence":"CC-BY-4.0","modified":"2023-11-08T04:15:57.217Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2022-0072","url":"https://rustsec.org/advisories/RUSTSEC-2022-0072.html","licence":"CC0-1.0","modified":"2023-11-08T04:15:57.217Z"}],"updatedAt":"2026-11-25T22:56:43.116Z"}