CVE-2024-39330
JSON

4.3medium

Django Path Traversal vulnerability

Severity
4.3medium CVSS:3.1 by CISA-ADP
Exploit likelihood
1.01% (higher than 64% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-9jmf-237g-qf46BIT-DJANGO-2024-39330PYSEC-2024-58

Description

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.)

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
django (PyPI)from 5.0 before 5.0.7, from 4.2 before 4.2.14GitHub Advisory Database, PyPA Advisory Database
djangoproject djangofrom 4.2 before 4.2.14, from 5.0 before 5.0.7NVD
django (Bitnami)from 4.2.0 before 4.2.14, from 5.0.0 before 5.0.7Bitnami Vulnerability Database

All scores

CISA-ADP4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Bitnami Vulnerability Databasemedium rating

Classification

CWE-22

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.)

GitHub Advisory Database

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.)

NVD (es)

Se descubrió un problema en Django 5.0 anterior a 5.0.7 y 4.2 anterior a 4.2.14. Las clases derivadas de la clase base django.core.files.storage.Storage, cuando anulan generate_filename() sin replicar las validaciones de ruta de archivo de la clase principal, potencialmente permiten directory traversal a través de ciertas entradas durante una llamada save(). (Las subclases de almacenamiento integrado no se ven afectadas).

References

https://docs.djangoproject.com/en/dev/releases/security/advisory, vendor-advisory, web
https://groups.google.com/forum/#%21forum/django-announcepermissions-required, web
https://www.djangoproject.com/weblog/2024/jul/09/security-releases/advisory, article, vendor-advisory
https://security.netapp.com/advisory/ntap-20240808-0005/web
https://nvd.nist.gov/vuln/detail/CVE-2024-39330advisory, web
https://github.com/django/django/commit/2b00edc0151a660d1eb86da4059904a0fc4e095eweb
https://github.com/django/django/commit/9f4f63e9ebb7bf6cb9547ee4e2526b9b96703270web
https://docs.djangoproject.com/en/dev/releases/securityweb
https://github.com/django/djangopackage
https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2024-58.yamlweb
https://security.netapp.com/advisory/ntap-20240808-0005web
https://www.djangoproject.com/weblog/2024/jul/09/security-releasesweb

Sources

SourceRecordLicence
CVE ListCVE-2024-39330 changed 2025-11-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-9jmf-237g-qf46 changed 2026-09-10CC-BY-4.0
NVDCVE-2024-39330 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2024-58 changed 2026-06-10CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-DJANGO-2024-39330 changed 2026-09-08Apache-2.0