GHSA-8v4j-7jgf-5rg9 Warp vulnerable to Path Traversal via Improper validation of Windows paths
An attacker can read arbitrary files on Windows systems via path traversal in the Warp web framework's directory filter.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-8v4j-7jgf-5rg9?
GHSA-8v4j-7jgf-5rg9 is a path traversal vulnerability in warp, published on 14 Jan 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Path resolution in warp::filters::fs::dir 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.
Which versions are affected by GHSA-8v4j-7jgf-5rg9?
3 open source packages ship an affected version, including warp.
| Package | Affected | Fixed in |
|---|---|---|
warp crates.io | All versions | 0.3.3 |
warp crates.io | All versions | 0.3.3 |
warp crates.io | From 0.0.0-0 | 0.3.3 |
How do I fix GHSA-8v4j-7jgf-5rg9?
Upgrade warp to 0.3.3 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is GHSA-8v4j-7jgf-5rg9 being exploited?
There is no known exploitation of GHSA-8v4j-7jgf-5rg9 in the wild and no public exploit code.
Sources
Also known as RUSTSEC-2022-0082.