GHSA-7p7c-pvvx-2vx3 json
hyper-staticfile's improper validation of Windows paths could lead to directory traversal attack
published 3y ago modified 3y ago also RUSTSEC-2022-0069
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
Path resolution in `hyper-staticfile` didn't correctly validate Windows paths, meaning paths like `/foo/bar/c:/windows/web/screen/img101.png` would be allowed and respond with the contents of `c:/windows/web/screen/img101.png`. Thus users could potentially read files anywhere on the filesystem.
This only impacts Windows. Linux and other unix likes are not impacted by this.
Patch / fix
- crates.io hyper-staticfile 0.9.2, 0.10.0-alpha.2
- github.com/stephank/hyper-staticfile@1e40e31 commit
- github.com/stephank/hyper-staticfile#36 pull request
Is GHSA-7p7c-pvvx-2vx3 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | hyper-staticfile | <0.9.2 >=0.10.0-alpha.1, <0.10.0-alpha.2 >=0.0.0-0, <0.9.2 >=0.10.0-0, <0.10.0-alpha.2 |
0.9.2 0.10.0-alpha.2 |
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/stephank/hyper-staticfile/pull/36
web
-
github.com
/stephank/hyper-staticfile/commit/1e40e31d64bc6b32e595d24074092dcf84410b2b
web
-
github.com
/stephank/hyper-staticfile/issues/35
web, report
-
github.com
/stephank/hyper-staticfile
package
-
rustsec.org
/advisories/RUSTSEC-2022-0069.html
web, advisory
-
crates.io
/crates/hyper-staticfile
package
Sources
- GitHub Advisory GHSA-7p7c-pvvx-2vx3
- OSV RUSTSEC-2022-0069
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.