GHSA-5wvv-q5fv-2388
medium
hyper-staticfile's location header incorporates user input, allowing open redirect
- Severity
- medium rating by GitHub
- Published
- Last changed
- Also known as
- RUSTSEC-2022-0072
Description
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.
An 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| hyper-staticfile (crates.io) | before 0.9.4, from 0.10.0-alpha.1 before 0.10.0-alpha.5, from 0.0.0-0 before 0.9.4, from 0.10.0-0 before 0.10.0-alpha.5 | GitHub Advisory Database, RustSec Advisory Database |
Classification
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-5wvv-q5fv-2388 changed 2023-11-08 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2022-0072 changed 2023-11-08 | CC0-1.0 |