# GHSA-7p7c-pvvx-2vx3: hyper-staticfile's improper validation of Windows paths could lead to directory traversal attack

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2022-11-30T12:00:00.000Z
- Modified: 2023-11-08T04:16:54.984Z
- Also known as: RUSTSEC-2022-0069
- Weaknesses: CWE-22

## Description

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.

(As written by GitHub Advisory Database.)

## Affected

- hyper-staticfile (crates.io): before 0.9.2; from 0.10.0-alpha.1 before 0.10.0-alpha.2; from 0.0.0-0 before 0.9.2; from 0.10.0-0 before 0.10.0-alpha.2

## References

- <https://github.com/stephank/hyper-staticfile/issues/35> (report, web)
- <https://github.com/stephank/hyper-staticfile/pull/36> (web)
- <https://github.com/stephank/hyper-staticfile/commit/1e40e31d64bc6b32e595d24074092dcf84410b2b> (web)
- <https://github.com/stephank/hyper-staticfile> (package)
- <https://rustsec.org/advisories/RUSTSEC-2022-0069.html> (advisory, web)
- <https://crates.io/crates/hyper-staticfile> (package)

## Sources

- GitHub Advisory Database: [GHSA-7p7c-pvvx-2vx3](https://github.com/advisories/GHSA-7p7c-pvvx-2vx3), CC-BY-4.0, modified 2023-11-08
- RustSec Advisory Database: [RUSTSEC-2022-0069](https://rustsec.org/advisories/RUSTSEC-2022-0069.html), CC0-1.0, modified 2023-11-08

---

Page: https://cve.day/GHSA-7p7c-pvvx-2vx3 · Whole record: https://cve.day/GHSA-7p7c-pvvx-2vx3.json · Rebuilt by cve.day 2026-11-25T22:56:43.115Z
