GHSA-wwh2-r387-g5rm

Suggest an improvement
Source
https://github.com/advisories/GHSA-wwh2-r387-g5rm
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-wwh2-r387-g5rm/GHSA-wwh2-r387-g5rm.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-wwh2-r387-g5rm
Published
2022-06-17T00:26:05Z
Modified
2023-06-13T22:06:25Z
Summary
tower-http's improper validation of Windows paths could lead to directory traversal attack
Details

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.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-22"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2022-06-17T00:26:05Z"
}
References

Affected packages

crates.io / tower-http

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.2.0
Fixed
0.2.1

Ecosystem specific

{
    "affected_functions": [
        "tower_http::services::fs::ServeDir"
    ]
}

crates.io / tower-http

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.1.3

Ecosystem specific

{
    "affected_functions": [
        "tower_http::services::fs::ServeDir"
    ]
}