CVE-2024-39330: Django Path Traversal vulnerability
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.15394%
CWE
Published
7/10/2024
Updated
8/9/2024
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 |
|---|---|---|---|
| Django | pip | >= 5.0, < 5.0.7 | 5.0.7 |
| Django | pip | >= 4.2, < 4.2.14 | 4.2.14 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability arises because the original save() method in Storage did not validate the filename before and after calling get_available_name(). Subclasses overriding generate_filename() (used by get_available_name()) without replicating the parent's validation could bypass checks. The patch added explicit validate_file_name() calls in save() to enforce validation regardless of subclass implementations. Thus, the unpatched save() method is the vulnerable function when used with such subclasses.