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

Not scored Published

Improper Windows path validation in hyper-staticfile allows attackers to read arbitrary files from the filesystem via directory traversal.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is GHSA-7p7c-pvvx-2vx3?

GHSA-7p7c-pvvx-2vx3 is a path traversal vulnerability in hyper-staticfile, published on 30 Nov 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Which versions are affected by GHSA-7p7c-pvvx-2vx3?

5 open source packages ship an affected version, including hyper-staticfile.

PackageAffectedFixed in
hyper-staticfile crates.ioAll versions0.9.2
hyper-staticfile crates.ioAll versions0.9.2
hyper-staticfile crates.ioFrom 0.0.0-00.9.2, 0.10.0-alpha.2
hyper-staticfile crates.ioFrom 0.10.0-alpha.10.10.0-alpha.2
hyper-staticfile crates.ioFrom 0.10.0-alpha.10.10.0-alpha.2

How do I fix GHSA-7p7c-pvvx-2vx3?

Upgrade hyper-staticfile to a fixed version for your release line: 0.9.2 or 0.10.0-alpha.2.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is GHSA-7p7c-pvvx-2vx3 being exploited?

There is no known exploitation of GHSA-7p7c-pvvx-2vx3 in the wild and no public exploit code.

Sources

Also known as RUSTSEC-2022-0069.

Is GHSA-7p7c-pvvx-2vx3 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free