CVE-2024-39330: Django Path Traversal vulnerability
Affects DjangoSource GCVE Database
Not known to be exploited · CVSS 4.3 Medium : upgrade to 5.0.7 when convenient.
Data as of 4 Nov 2026, 17:27 UTC
- Patch
- Available – fixed in 5.0.7, 4.2.14
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:NExploitation evidence
Disclosed: evidence found.
CVE published 10 Jul 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 4 Nov 2026.
What to do
Upgrade Django to 5.0.7; Django to 4.2.14.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PyPIDjango | Affected
| Fixed in
|
| PyPIDjango | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Apply the official patches by upgrading Django to version 5.0.7 or later, or 4.2.14 or later. These versions include the necessary file-path validation in generate_filename() to prevent directory traversal. No additional mitigation is required if these versions are in use.
Description
CVE-2024-39330 is a directory traversal vulnerability in Django versions 5.0 before 5.0.7 and 4.2 before 4.2.14. It affects derived classes of the django.core.files.storage.Storage base class that override generate_filename() without replicating the parent class's file-path validations. This flaw can allow an attacker to perform directory traversal during a save() call. Built-in Storage subclasses are not affected. The issue has been fixed in Django 5.0.7 and 4.2.14.
References
- nvd.nist.gov/vuln/detail/CVE-2024-39330 (opens in a new tab)
- github.com/django/django/commit/2b00edc0151a660d1eb86da4059904a0fc4e095e (opens in a new tab)
- github.com/django/django/commit/9f4f63e9ebb7bf6cb9547ee4e2526b9b96703270 (opens in a new tab)
- docs.djangoproject.com/en/dev/releases/security (opens in a new tab)
- github.com/django/django (opens in a new tab)
- github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2024-58.yaml (opens in a new tab)
- groups.google.com/forum/ (opens in a new tab)
- security.netapp.com/advisory/ntap-20240808-0005 (opens in a new tab)
- djangoproject.com/weblog/2024/jul/09/security-releases (opens in a new tab)