Vulnerability · Published Jul 10, 2024 · Assigned by mitre
CVE-2024-39330
Medium 4.3
In plain English
A medium-severity path traversal in the py3-django package (Alpine). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.0% (higher than 63% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | py3-django | 4.2.16-r0 | ALPINE-CVE-2024-39330 |
| Alpine:v3.21 | py3-django | 4.2.16-r0 | ALPINE-CVE-2024-39330 |
| Alpine:v3.22 | py3-django | 4.2.16-r0 | ALPINE-CVE-2024-39330 |
| Alpine:v3.23 | py3-django | 4.2.16-r0 | ALPINE-CVE-2024-39330 |
| Alpine:v3.24 | py3-django | 4.2.16-r0 | ALPINE-CVE-2024-39330 |
| Debian:12 | python-django | 3:3.2.25-0+deb12u1 | DSA-6136-1 |
| Debian:12 | python-django | 3:3.2.25-0+deb12u1 | DEBIAN-CVE-2024-39330 |
| Debian:13 | python-django | 3:4.2.14-1 | DEBIAN-CVE-2024-39330 |
| Debian:14 | python-django | 3:4.2.14-1 | DEBIAN-CVE-2024-39330 |
| PyPI | django | 4.2.14 | GHSA-9jmf-237g-qf46 |
| PyPI | django | 4.2.14, 5.0.7 | PYSEC-2024-58 |
| PyPI | django | 5.0.7 | GHSA-9jmf-237g-qf46 |
| Ubuntu:22.04:LTS | python-django | 2:3.2.12-2ubuntu1.12 | USN-6888-1 |
| Ubuntu:22.04:LTS | python-django | 2:3.2.12-2ubuntu1.12 | UBUNTU-CVE-2024-39330 |
| Ubuntu:24.04:LTS | python-django | 3:4.2.11-1ubuntu1.1 | UBUNTU-CVE-2024-39330 |
| Ubuntu:24.04:LTS | python-django | 3:4.2.11-1ubuntu1.1 | USN-6888-1 |
Affected products (as reported)
Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N