Skip to content
OpenAdvisories
Low · 3.1 CVE-2025-59682 BIT-django-2025-59682EUVD-2025-32692GHSA-q95w-c7qg-hrffPYSEC-2026-1296

Django vulnerable to partial directory traversal via archives

Published Oct 1, 2025 · Updated Nov 4, 2025 · Assigned by mitre

Description

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.

Affected products

VendorProductAffectedFixed
djangoproject Django 4.2 – < 4.2.25, 5.1 – < 5.1.13, 5.2 – < 5.2.7 4.2.25

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-django 3:4.2.25-1 —
Debian 13 python-django 3:4.2.27-0+deb13u1 DSA-6117-1
Debian 12 python-django 3:3.2.25-0+deb12u1 DSA-6136-1
Debian 11 python-django 2:2.2.28-1~deb11u9 DLA-4324-1
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS python-django 3:5.2.4-1ubuntu2 —
Ubuntu 25.10 python-django 3:5.2.4-1ubuntu2 —
Ubuntu 24.04 LTS python-django 3:4.2.11-1ubuntu1.11 USN-7794-1
Ubuntu 22.04 LTS python-django 2:3.2.12-2ubuntu1.22 USN-7794-1
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS python-django 2:2.2.12-1ubuntu0.29+esm4 USN-7794-1
Ubuntu Pro 18.04 LTS python-django 1:1.11.11-1ubuntu1.21+esm12 USN-7794-1
Ubuntu Pro 16.04 LTS python-django 1.8.7-1ubuntu5.15+esm9 USN-7794-1
Ubuntu Pro 14.04 LTS python-django 1.6.11-0ubuntu1.3+esm8 USN-7794-1
ReleasePackageFixed inAdvisory
Red Hat Ansible Automation Platform Developer 2 python3.11-django 4.2.25-1.el8ap RHSA-2025:19201, RHSA-2025:18979
Red Hat Ansible Automation Platform 2 automation-eda-controller +4 1.2.1-1.el9ap RHSA-2025:19201
Red Hat Ansible Automation Platform 2 automation-gateway +2 2.5.20251022-1.el8ap RHSA-2025:18979
Red Hat Ansible Automation Platform 2 automation-platform-ui 2.6.2-1.el9ap RHSA-2025:19201
Red Hat Ansible Automation Platform 2 python3.11-django 4.2.25-1.el8ap RHSA-2025:19201, RHSA-2025:18979
ReleasePackageFixed inAdvisory
SLES 15 SP7 python-Django 4.2.11-150600.3.33.1 SUSE-SU-2025:03446-1
SLES 15 SP6 python-Django 4.2.11-150600.3.33.1 SUSE-SU-2025:03446-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-Django 5.2.7-1.1 openSUSE-SU-2025:15598-1
openSUSE Tumbleweed python-Django4 4.2.25-1.1 openSUSE-SU-2025:15596-1
openSUSE Tumbleweed python-Django5 5.2.16-1.1 openSUSE-SU-2026:11270-1
openSUSE Tumbleweed python-Django6 6.0-1.1 openSUSE-SU-2026:10005-1
openSUSE Leap 16.0 python-Django 5.2.4-bp160.3.1 openSUSE-SU-2025:20022-1
openSUSE Leap 15.6 python-Django 4.2.11-150600.3.33.1 SUSE-SU-2025:03446-1
ReleasePackageFixed inAdvisory
Alpine v3.24 py3-django 4.2.25-r0 —
Alpine v3.23 py3-django 4.2.25-r0 —
Alpine v3.22 py3-django 4.2.25-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI django >= 4.2, < 4.2.25 4.2.25 GHSA-q95w-c7qg-hrff
PyPI django >= 5.1, < 5.1.13 5.1.13 GHSA-q95w-c7qg-hrff
PyPI django >= 5.2, < 5.2.7 5.2.7 GHSA-q95w-c7qg-hrff
PyPI django >= 4.2, < 4.2.25 · >= 5.1, < 5.1.13 · >= 5.2, < 5.2.7 4.2.25, 5.1.13, 5.2.7 PYSEC-2026-1296

Advisories 14

References