GHSA-qj8w-rv5x-2v9h: Duplicate Advisory: Starlette vulnerable to directory traversal
7.5
CVSS Score
3.1
Basic Information
CVE ID
-
GHSA ID
EPSS Score
-
CWE
Published
6/1/2023
Updated
11/6/2023
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| starlette | pip | >= 0.13.5, < 0.27.0 | 0.27.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the directory traversal check in StaticFiles handling. The commit diff shows a critical change from os.path.commonprefix() to os.path.commonpath() in starlette/staticfiles.py. The original commonprefix approach failed to properly validate() path components, as demonstrated in the PoC where paths like '/static/../static1.txt' bypassed security checks. The lookup_path function is directly responsible for path validation in static file handling, making it the clear vulnerable function. Multiple sources (advisory, CWE-22 mapping, and commit analysis) confirm this root cause.