GHSA-5wvv-q5fv-2388: Hyper staticfile Hyper-staticfile's Location Header Incorporates User Vulnerability
MODERATEGHSA-5wvv-q5fv-2388 is a MODERATE hyper-staticfile's location header incorporates user vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Hyper staticfile libraries in the crates.io ecosystem. The issue involves hyper-staticfile's location header incorporates user input, allowing open redirect. Remediation is available by upgrading affected packages to version 0.9.4, 0.10.0-alpha.5.
GHSA-5wvv-q5fv-2388 at a Glance
How to Fix GHSA-5wvv-q5fv-2388
To remediate this vulnerability, upgrade all affected Hyper staticfile dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade hyper-staticfile to 0.9.4
Upgrade hyper-staticfile to 0.10.0-alpha.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for hyper-staticfile
How to Check if You Are Affected
To determine whether your application is affected by GHSA-5wvv-q5fv-2388, inspect your project dependencies for Hyper staticfile:
inspect dependencies for hyper-staticfile
Analyze the terminal output to locate any version of Hyper staticfile in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.9.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Hyper staticfile, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-5wvv-q5fv-2388 Affected Hyper staticfile Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
hyper-staticfile
|
crates.io |
< 0.9.4
|
0.9.4
|
|
hyper-staticfile
|
crates.io |
≥ 0.10.0-alpha.1
< 0.10.0-alpha.5
|
0.10.0-alpha.5
|
References
Frequently Asked Questions
What is GHSA-5wvv-q5fv-2388?
Which Hyper staticfile versions are affected?
What version fixes GHSA-5wvv-q5fv-2388?
Is hyper-staticfile affected?
What CWE is associated with GHSA-5wvv-q5fv-2388?
How can I check crates.io dependencies for GHSA-5wvv-q5fv-2388?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5wvv-q5fv-2388",
"modified" : "2022-12-30T16:57:28Z",
"published" : "2022-12-30T16:57:28Z",
"aliases" : [ ],
"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",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "hyper-staticfile"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.9.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "hyper-staticfile"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.10.0-alpha.1"
}, {
"fixed" : "0.10.0-alpha.5"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-12-30T16:57:28Z",
"nvd_published_at" : null
}
}