Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. hyper-staticfile
  4. ›
  5. GHSA-7p7c-pvvx-2vx3

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

December 5, 2022

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

  • github.com/advisories/GHSA-7p7c-pvvx-2vx3
  • github.com/stephank/hyper-staticfile
  • github.com/stephank/hyper-staticfile/commit/1e40e31d64bc6b32e595d24074092dcf84410b2b
  • github.com/stephank/hyper-staticfile/issues/35
  • github.com/stephank/hyper-staticfile/pull/36
  • rustsec.org/advisories/RUSTSEC-2022-0069.html

Code Behaviors & Features

Detect and mitigate GHSA-7p7c-pvvx-2vx3 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.9.2, all versions starting from 0.10.0-alpha.1 before 0.10.0-alpha.2, version 0.10.0-alpha.1

Fixed versions

  • 0.9.2
  • 0.10.0-alpha.2

Solution

Upgrade to versions 0.10.0-alpha.2, 0.9.2 or above.

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

cargo/hyper-staticfile/GHSA-7p7c-pvvx-2vx3.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:13 +0000.