GHSA-7p7c-pvvx-2vx3: hyper-staticfile's improper validation of Windows paths could lead to directory traversal attack
N/A
CVSS Score
Basic Information
CVE ID
-
GHSA ID
EPSS Score
-
CWE
Published
12/5/2022
Updated
3/30/2023
KEV Status
No
Technology
Rust
Technical Details
CVSS Vector
-
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
hyper-staticfile | rust | < 0.9.2 | 0.9.2 |
hyper-staticfile | rust | = 0.10.0-alpha.1 | 0.10.0-alpha.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how normalize_path
handled path components. The original implementation (pre-patch) directly pushed 'Component::Normal' segments without validating if they contained Windows drive letter prefixes. The patch adds a secondary check that re-parses each component to ensure it doesn't contain drive letters or other special components. This matches the vulnerability description where paths like '/foo/bar/c:/windows/...' would resolve to absolute Windows paths. The added Windows-specific test in static.rs
confirms this was the attack vector.