Vulnerabilities

CVE-2025-59682

Medium 6.5 CVSS 3.1

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.

Description as published by the source, in English.

Key facts

Published
2025-10-01
Last modified
2026-10-12
Assigned by
cve@mitre.org
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Scored by
nvd@nist.gov (NVD Primary)
Probability of exploitation
0.9 % higher than 55 % of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15
Fix available
Not registered in the sources

Affected products

Vendor Product Versions Status
Djangoproject Django ≥ 4.2.0, < 4.2.25 Affected
Djangoproject Django ≥ 5.1, < 5.1.13 Affected
Djangoproject Django ≥ 5.2, < 5.2.7 Affected

Weakness type

  • CWE-23: Relative Path Traversal

    The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that dir…

References

Does this affect you?

A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.

Check your asset list Browse all vulnerabilities