CVE-2025-59682: Django vulnerable to partial directory traversal via archives
An issue was discovered in Django 4.2 before 4.2.25, 5.1 before 5.1.13, and 5.2 before 5.2.7. The django.utils.archive.extract() function, used by the "startapp --template" and "startproject --template" commands, allows partial directory traversal via an archive with file paths sharing a common prefix with the target directory.
Published Oct 1, 2025 · Updated Nov 5, 2025
Affected packages
django
- Ecosystem
- PyPI
- Affected
- >= 4.2, < 4.2.25
- Fixed in
- 4.2.25
- Check
pip show django
django
- Ecosystem
- PyPI
- Affected
- >= 5.1, < 5.1.13
- Fixed in
- 5.1.13
- Check
pip show django
django
- Ecosystem
- PyPI
- Affected
- >= 5.2, < 5.2.7
- Fixed in
- 5.2.7
- Check
pip show django
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
An issue was discovered in Django 4.2 before 4.2.25, 5.1 before 5.1.13, and 5.2 before 5.2.7. The django.utils.archive.extract() function, used by the "startapp --template" and "startproject --template" commands, allows partial directory traversal via an archive with file paths sharing a common prefix with the target directory.
References
- https://nvd.nist.gov/vuln/detail/CVE-2025-59682
- https://docs.djangoproject.com/en/dev/releases/security
- https://groups.google.com/g/django-announce
- https://www.djangoproject.com/weblog/2025/oct/01/security-releases
- https://github.com/django/django/commit/43d84aef04a9e71164c21a74885996981857e66e
- https://github.com/django/django/commit/924a0c092e65fa2d0953fd1855d2dc8786d94de2
- https://github.com/advisories/GHSA-q95w-c7qg-hrff
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-15830
Django GeoDjango vulnerable to denial of service through deeply nested geometry collections
medium5.3Aug 4, 2026CVE-2026-48588
Django: cache middleware may expose private responses when unrelated request cookies are present
low3.1Jul 7, 2026CVE-2026-53877
Django: GDALRaster may over-read heap memory when constructed from bytes
medium4.8Jul 7, 2026CVE-2026-53878
Django: DomainNameValidator permits newline characters that may enable HTTP header injection
medium6.1Jul 7, 2026CVE-2026-35193
Django: UpdateCacheMiddleware may disclose private cached responses by omitting Authorization from Vary
low3.1Jun 3, 2026CVE-2026-48587
Django: has_vary_header may expose cached responses when Vary values contain whitespace
low3.1Jun 3, 2026
