{"id":"CVE-2025-59682","published":"2025-10-01T00:00:00Z","modified":"2025-11-04T21:13:56Z","title":"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","vendor":"djangoproject","product":"Django","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.1,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00966,"percentile":0.62589,"provenance":"source"},"cwes":[{"id":"CWE-23","name":"Relative Path Traversal"}],"references":[{"url":"https://docs.djangoproject.com/en/dev/releases/security/","tags":[]},{"url":"https://groups.google.com/g/django-announce","tags":[]},{"url":"https://www.djangoproject.com/weblog/2025/oct/01/security-releases/","tags":[]},{"url":"http://www.openwall.com/lists/oss-security/2025/10/01/3","tags":[]}],"priority":{"score":14.7,"factors":[{"name":"EPSS percentile","points":12.52},{"name":"CVSS severity","points":2.17}]},"vendorSlug":"djangoproject","affectedVersions":[{"vendor":"djangoproject","product":"Django","versions":[">= 4.2, < 4.2.25",">= 5.1, < 5.1.13",">= 5.2, < 5.2.7"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-10-01T19:10:29.537724Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"django","vulnerableRanges":[">=4.2, <4.2.25",">=5.1, <5.1.13",">=5.2, <5.2.7"],"patched":["4.2.25","5.1.13","5.2.7"],"from":["GHSA-q95w-c7qg-hrff","PYSEC-2026-1296"],"provenance":"source"}],"summary":{"text":"The django.utils.archive.extract() function in Django 4.2 (before 4.2.25), 5.1 (before 5.1.13) and 5.2 (before 5.2.7) contains a relative path traversal flaw, exposed through the \"startapp --template\" and \"startproject --template\" commands. An attacker with low-privilege access who can supply a crafted archive to these commands, and who is able to get an operator to run them, can write files partially outside the target directory when archive entries share a common prefix with it, with the attack complexity being high.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:43:00Z"},"euvd":{"id":"EUVD-2025-32692","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-djangoproject-django-cve-2021-3281","parents":[{"from":"CVE-2021-3281","to":"CVE-2025-59682","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["django/utils/archive.py"],"commits":["https://github.com/django/django/commit/02e6592835b4559909aa3aaaf67988fef435f624","https://github.com/django/django/commit/05413afa8c18cdb978fcdf470e09f7a12b234a23","https://github.com/django/django/commit/43d84aef04a9e71164c21a74885996981857e66e","https://github.com/django/django/commit/924a0c092e65fa2d0953fd1855d2dc8786d94de2"],"basis":"shared function","functions":["has_leading_dir"]}]}]}}