cve.bz

CVE-2025-59682 djangoproject django: Relative Path Traversal

6.5 mediumEPSS 1.0%Fix available

Medium (6.5) in djangoproject django. EPSS 1.0% estimated probability of exploitation activity in the next 30 days. Fixed in django 4.2.25, 5.1.13, 5.2.7.

On this page
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.

Severity

CVSS 3.1

6.5 medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
EPSS
1.0% (unchanged from 0.9% a week ago; 0.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 62nd percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2025-10-01. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-23 Relative Path Traversal
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-59682 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-59682?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-59682?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-59682 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2025-59682

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2025-59682](https://cve.bz/cve/badge/CVE-2025-59682.svg)](https://cve.bz/cve/CVE-2025-59682)

HTML:

<a href="https://cve.bz/cve/CVE-2025-59682"><img src="https://cve.bz/cve/badge/CVE-2025-59682.svg" alt="CVE-2025-59682"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
djangoproject Djangofrom 4.2 before 4.2.25
djangoproject Djangofrom 5.1 before 5.1.13
djangoproject Djangofrom 5.2 before 5.2.7

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-q95w-c7qg-hrffPyPIdjango>=4.2 <4.2.254.2.25
GHSA-q95w-c7qg-hrffPyPIdjango>=5.1 <5.1.135.1.13
GHSA-q95w-c7qg-hrffPyPIdjango>=5.2 <5.2.75.2.7
PYSEC-2026-1296PyPIdjango>=4.2 <4.2.25
>=5.1 <5.1.13
>=5.2 <5.2.7
4.2.25, 5.1.13, 5.2.7

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11python-django2:2.2.28-1~deb11u9DLA-4324-1
Debian12python-django3:3.2.25-0+deb12u1DEBIAN-CVE-2025-59682 DSA-6136-1
Debian13python-django3:4.2.27-0+deb13u1DEBIAN-CVE-2025-59682 DSA-6117-1
Debian14python-django3:4.2.25-1DEBIAN-CVE-2025-59682
Ubuntu22.04:LTSpython-django2:3.2.12-2ubuntu1.22UBUNTU-CVE-2025-59682 USN-7794-1
Ubuntu24.04:LTSpython-django3:4.2.11-1ubuntu1.11UBUNTU-CVE-2025-59682 USN-7794-1
Ubuntu25.10, 26.04:LTSpython-django3:5.2.4-1ubuntu2UBUNTU-CVE-2025-59682
UbuntuPro:14.04:LTSpython-django1.6.11-0ubuntu1.3+esm8UBUNTU-CVE-2025-59682 USN-7794-1
UbuntuPro:16.04:LTSpython-django1.8.7-1ubuntu5.15+esm9UBUNTU-CVE-2025-59682 USN-7794-1
UbuntuPro:18.04:LTSpython-django1:1.11.11-1ubuntu1.21+esm12UBUNTU-CVE-2025-59682 USN-7794-1
UbuntuPro:20.04:LTSpython-django2:2.2.12-1ubuntu0.29+esm4UBUNTU-CVE-2025-59682 USN-7794-1
Red Hatansible_automation_platform:2.5::el8automation-gateway, automation-gateway-config, automation-gateway-server0:2.5.20251022-1.el8apRHSA-2025:18979
Red Hatansible_automation_platform:2.5::el8, ansible_automation_platform_developer:2.5::el8python3.11-django0:4.2.25-1.el8apRHSA-2025:18979
Red Hatansible_automation_platform:2.5::el9automation-gateway, automation-gateway-config, automation-gateway-server0:2.5.20251022-1.el9apRHSA-2025:18979
Red Hatansible_automation_platform:2.5::el9, ansible_automation_platform_developer:2.5::el9python3.11-django0:4.2.25-1.el9apRHSA-2025:18979
Red Hatansible_automation_platform:2.6::el9automation-eda-controller, automation-eda-controller-base, automation-eda-controller-base-services and 2 more0:1.2.1-1.el9apRHSA-2025:19201
Red Hatansible_automation_platform:2.6::el9automation-platform-ui0:2.6.2-1.el9apRHSA-2025:19201
Red Hatansible_automation_platform:2.6::el9, ansible_automation_platform_developer:2.6::el9python3.11-django0:4.2.25-1.el9apRHSA-2025:19201
SUSELinux Enterprise Module for Package Hub 15 SP6, Linux Enterprise Module for Package Hub 15 SP7python-Django4.2.11-150600.3.33.1SUSE-SU-2025:03446-1
openSUSELeap 15.6python-Django4.2.11-150600.3.33.1SUSE-SU-2025:03446-1
openSUSELeap 16.0python-Django5.2.4-bp160.3.1openSUSE-SU-2025:20022-1
openSUSETumbleweedpython-Django5.2.7-1.1openSUSE-SU-2025:15598-1
openSUSETumbleweedpython-Django44.2.25-1.1openSUSE-SU-2025:15596-1
openSUSETumbleweedpython-Django55.2.16-1.1openSUSE-SU-2026:11270-1
openSUSETumbleweedpython-Django66.0-1.1openSUSE-SU-2026:10005-1
Alpinev3.22, v3.23, v3.24py3-django4.2.25-r0ALPINE-CVE-2025-59682

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Ansible Automation Platform 2.5 for RHEL 8python3.11-django-0:4.2.25-1.el8apFixed 2025-10-22RHSA-2025:18979
Red Hat Ansible Automation Platform 2.5 for RHEL 8ansible-automation-platform-25/lightspeed-rhel8:2.5.250924-2Fixed 2025-10-22RHSA-2025:18984
Red Hat Ansible Automation Platform 2.5 for RHEL 9python3.11-django-0:4.2.25-1.el9apFixed 2025-10-22RHSA-2025:18979
Red Hat Ansible Automation Platform 2.6 for RHEL 9python3.11-django-0:4.2.25-1.el9apFixed 2025-10-28RHSA-2025:19201
Red Hat Ansible Automation Platform 2.6ansible-automation-platform-26/lightspeed-rhel9:2.6Fixed 2025-10-28RHSA-2025:19221
Red Hat Ansible Automation Platform 2.6ansible-automation-platform-tech-preview/ansible-devspaces-rhel9:2.6-1765600296Fixed 2025-12-15RHSA-2025:23196
Red Hat Discovery 2discovery/discovery-server-rhel9:1767888970Fixed 2026-01-08RHSA-2026:0414
OpenShift Service Mesh 3openshift-service-mesh/istio-cni-rhel9Not affected
OpenShift Service Mesh 3openshift-service-mesh/istio-must-gather-rhel9Not affected
OpenShift Service Mesh 3openshift-service-mesh/istio-pilot-rhel9Not affected
OpenShift Service Mesh 3openshift-service-mesh/istio-proxyv2-rhel9Affected
OpenShift Service Mesh 3openshift-service-mesh/istio-rhel9-operatorNot affected
OpenShift Service Mesh 3openshift-service-mesh/istio-sail-operator-bundleNot affected
OpenShift Service Mesh 3openshift-service-mesh-tech-preview/istio-ztunnel-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/lightspeed-rhel8Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/ansible-dev-tools-rhel8Not affected
Red Hat Ansible Automation Platform 2automation-controllerNot affected
Red Hat Ansible Automation Platform 2python-djangoAffected
Red Hat Certification for Red Hat Enterprise Linux 7python-djangoAffected
Red Hat Discovery 1discovery/discovery-server-rhel9Not affected
6 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-59682.

Attack patterns (CAPEC)

  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-139 Relative Path Traversal Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON