# RUSTSEC-2022-0069: Improper validation of Windows paths could lead to directory traversal attack

- Database: RustSec
- Published: 2022-11-30
- Modified: 2023-11-08

## Also published as

- [GHSA-7P7C-PVVX-2VX3](https://cve.now/GHSA-7P7C-PVVX-2VX3.md) (GitHub)

## Affected versions

- hyper-staticfile (crates.io): fixed in 0.9.2; from 0.10.0-0, fixed in 0.10.0-alpha.2

## 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.

## References

- https://crates.io/crates/hyper-staticfile
- https://rustsec.org/advisories/RUSTSEC-2022-0069.html
- https://github.com/stephank/hyper-staticfile/issues/35

Page: https://cve.now/RUSTSEC-2022-0069

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
