{"id":"GHSA-5wvv-q5fv-2388","summary":"hyper-staticfile's location header incorporates user input, allowing open redirect","details":"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.\n","aliases":["RUSTSEC-2022-0072"],"modified":"2023-11-08T04:15:57.217822Z","published":"2022-12-30T16:57:28Z","database_specific":{"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2022-12-30T16:57:28Z","nvd_published_at":null,"cwe_ids":["CWE-601"]},"references":[{"type":"WEB","url":"https://github.com/stephank/hyper-staticfile/commit/4db4afb811c553bc3d54a01a9985b9e6dfc5a115"},{"type":"WEB","url":"https://github.com/stephank/hyper-staticfile/commit/f12cadc6666c6f555d29725f5bc45da2103f24ea"},{"type":"PACKAGE","url":"https://github.com/stephank/hyper-staticfile"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2022-0072.html"}],"affected":[{"package":{"name":"hyper-staticfile","ecosystem":"crates.io","purl":"pkg:cargo/hyper-staticfile"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.9.4"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/12/GHSA-5wvv-q5fv-2388/GHSA-5wvv-q5fv-2388.json"}},{"package":{"name":"hyper-staticfile","ecosystem":"crates.io","purl":"pkg:cargo/hyper-staticfile"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.10.0-alpha.1"},{"fixed":"0.10.0-alpha.5"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/12/GHSA-5wvv-q5fv-2388/GHSA-5wvv-q5fv-2388.json"}}],"schema_version":"1.9.0"}