Django Path Traversal vulnerability
Published 10 Jul 2024 · Updated 10 Sept 2026
Is your project on an affected django?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=5.0 <5.0.7
- Fixed in
- 5.0.7
pip install 'django>=5.0.7'- Affected
- >=4.2 <4.2.14
- Fixed in
- 4.2.14
pip install 'django>=4.2.14'Details
An issue was discovered in Django 5.0 before 5.0.7 and 4.2 before 4.2.14. Derived classes of the django.core.files.storage.Storage base class, when they override generate_filename() without replicating the file-path validations from the parent class, potentially allow directory traversal via certain inputs during a save() call. (Built-in Storage sub-classes are unaffected.)
Is GHSA-9jmf-237g-qf46 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected django, and gives you the command that fixes it.
More advisories for django
- HighCVE-2026-15307Django GeoDjango spatial lookups allow file writes and outbound requests through GDAL raster parsing · 4 Aug 2026
- MediumCVE-2026-15830Django GeoDjango vulnerable to denial of service through deeply nested geometry collections · 4 Aug 2026
- MediumCVE-2026-53878Django: DomainNameValidator permits newline characters that may enable HTTP header injection · 7 Jul 2026
- MediumCVE-2026-53877 Django: GDALRaster may over-read heap memory when constructed from bytes · 7 Jul 2026
- LowCVE-2026-48588Django: cache middleware may expose private responses when unrelated request cookies are present · 7 Jul 2026
- LowCVE-2026-8404Django: UpdateCacheMiddleware may disclose cached responses due to case-sensitive Cache-Control handling · 3 Jun 2026
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2024-39330
- Linkgithub.com/django/django/commit/2b00edc0151a660d1eb86da4059904a0fc4e095e
- Linkgithub.com/django/django/commit/9f4f63e9ebb7bf6cb9547ee4e2526b9b96703270
- Linkdocs.djangoproject.com/en/dev/releases/security
- Packagegithub.com/django/django
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2024-58.yaml
- Linkgroups.google.com/forum/#%21forum/django-announce
- Linksecurity.netapp.com/advisory/ntap-20240808-0005
- Linkwww.djangoproject.com/weblog/2024/jul/09/security-releases
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.