GHSA-qrqq-9c63-xfrg
JSON

high

tower-http's improper validation of Windows paths could lead to directory traversal attack

Severity
high rating by GitHub
Published
Last changed
Also known as
RUSTSEC-2022-0043

Description

tower_http::services::fs::ServeDir 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.

See tower-http#204 for more details.

Affected

Product or packageVersionsReported by
tower-http (crates.io)from 0.2.0 before 0.2.1, before 0.1.3, from 0.0.0-0 before 0.1.3GitHub Advisory Database, RustSec Advisory Database

What each source says

GitHub Advisory Database

tower_http::services::fs::ServeDir 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.

See tower-http#204 for more details.

RustSec Advisory Database

tower_http::services::fs::ServeDir 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.

See tower-http#204 for more details.

References

Sources

SourceRecordLicence
GitHub Advisory DatabaseGHSA-qrqq-9c63-xfrg changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2022-0043 changed 2023-11-08CC0-1.0