Advisory

GHSA-5wvv-q5fv-2388

Also known as: RUSTSEC-2022-0072

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.

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2022-12-30 16:57 UTC
Modified
2023-11-08 04:15 UTC

Affected packages and fixes

hyper-staticfile

crates.io · All systems

Affected

  • introduced 0, fixed 0.9.4 (semver)

Fixed versions

0.9.4

Fix

  • Fixed version 0.9.4
    cargo update -p hyper-staticfile --precise 0.9.4

hyper-staticfile

crates.io · All systems

Affected

  • introduced 0.10.0-alpha.1, fixed 0.10.0-alpha.5 (semver)

Fixed versions

0.10.0-alpha.5

Fix

  • Fixed version 0.10.0-alpha.5
    cargo update -p hyper-staticfile --precise 0.10.0-alpha.5

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences