NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
LOW severity

CVE-2025-59682 — django

LOWFix: django/django@43d84ae

CVE-2025-59682 is a low-severity (CVSS 3.1) CWE-23 vulnerability in django. A fix is available for django — see the affected versions and patch details below.

Django vulnerable to partial directory traversal via archives

Also known asBIT-django-2025-59682GHSA-q95w-c7qg-hrffPYSEC-2026-1296
Published
Updated
Affected
3 pkgs
Patched
3 / 3
Exploits
None indexed
Exploitation data as of Nov 7, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2025-59682.

EPSS Exploitation Probability

via FIRST.org ↗
0.9%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs61th percentile — riskier than 61% of all scored CVEsHighest risk
0.00%0.48%0.95%1.43%0.0%0.9%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

3 pkgs affected
🐍django🐍django🐍django

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

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 Packages

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIdjango≥ 4.2&&< 4.2.254.2.25pip install --upgrade 'django==4.2.25'
🐍PyPIdjango≥ 5.1&&< 5.1.135.1.13pip install --upgrade 'django==5.1.13'
🐍PyPIdjango≥ 5.2&&< 5.2.75.2.7pip install --upgrade 'django==5.2.7'

Affected Products

1 product · 3 configurations
Application
djangodjangoproject
≥ 5.2 && < 5.2.7
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for django, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update django to 4.2.25 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-59682 is resolved across your whole dependency graph.

  3. Workarounds

    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant
Workaround published by Red Hat
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.
Source: Red Hat security advisory for CVE-2025-59682 (CC BY 4.0)
ProductFixed inAdvisory
Red Hat Ansible Automation Platform 2.5 for RHEL 8python3.11-django-0:4.2.25-1.el8apRHSA-2025:18979
Red Hat Ansible Automation Platform 2.5 for RHEL 8ansible-automation-platform-25/lightspeed-rhel8:2.5.250924-2RHSA-2025:18984
Red Hat Ansible Automation Platform 2.6 for RHEL 9python3.11-django-0:4.2.25-1.el9apRHSA-2025:19201
Red Hat Ansible Automation Platform 2.6ansible-automation-platform-26/lightspeed-rhel9:2.6RHSA-2025:19221
Red Hat Ansible Automation Platform 2.6ansible-automation-platform-tech-preview/ansible-devspaces-rhel9:2.6-1765600296RHSA-2025:23196
Red Hat Discovery 2discovery/discovery-server-rhel9:1767888970RHSA-2026:0414

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2025-59682 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2025-59682: django Path Traversal — Fixed in 4.2.25