{"id":"CVE-2025-59682","details":"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.","aliases":["BIT-django-2025-59682","GHSA-q95w-c7qg-hrff"],"modified":"2026-05-18T05:57:34.141189380Z","published":"2025-10-01T00:00:00Z","related":["CGA-m3w7-pvg6-3374","SUSE-SU-2025:03446-1","openSUSE-SU-2025:15596-1","openSUSE-SU-2025:15598-1","openSUSE-SU-2025:20022-1","openSUSE-SU-2026:10005-1"],"database_specific":{"cwe_ids":["CWE-23"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59682.json","cna_assigner":"mitre","unresolved_ranges":[{"extracted_events":[{"introduced":"4.2"},{"fixed":"4.2.25"},{"introduced":"5.1"},{"fixed":"5.1.13"},{"introduced":"5.2"},{"fixed":"5.2.7"}],"source":"AFFECTED_FIELD"},{"extracted_events":[{"introduced":"4.2"},{"fixed":"4.2.25"},{"introduced":"5.1"},{"fixed":"5.1.13"},{"introduced":"5.2"},{"fixed":"5.2.7"}],"source":"CPE_FIELD"},{"extracted_events":[{"introduced":"4.2"},{"fixed":"4.2.25"},{"introduced":"5.1"},{"fixed":"5.1.13"},{"introduced":"5.2"},{"fixed":"5.2.7"}],"source":"DESCRIPTION"}]},"references":[{"type":"WEB","url":"http://www.openwall.com/lists/oss-security/2025/10/01/3"},{"type":"WEB","url":"https://docs.djangoproject.com/en/dev/releases/security/"},{"type":"WEB","url":"https://groups.google.com/g/django-announce"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59682.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59682"},{"type":"ARTICLE","url":"https://www.djangoproject.com/weblog/2025/oct/01/security-releases/"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/django/django","events":[{"introduced":"0"},{"fixed":"57d20b2485e7cd2f029dbf49fb5510b2a6f12c48"},{"introduced":"84d09a547fe35e10018ab242602ca76c29ca91a1"},{"fixed":"467aeeb569da17a7573e8dfc4932434c84e70642"},{"introduced":"9e7cc2b628fe8fd3895986af9b7fc9525034c1b0"},{"fixed":"3cff3209e35a560f94801d428cf7f2a3ecb2a051"}],"database_specific":{"extracted_events":[{"introduced":"4.2.0"},{"fixed":"4.2.25"},{"introduced":"5.1"},{"fixed":"5.1.13"},{"introduced":"5.2"},{"fixed":"5.2.7"}],"source":"CPE_FIELD","cpe":"cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*"}}],"versions":["4.2.24","5.1.12","5.2.6","5.2.5","5.2.4","4.2.23","5.1.11","5.2.3","4.2.22","5.1.10","5.2.2","4.2.21","5.1.9","5.2.1","5.2","5.1.8","4.2.20","5.1.7","5.1.6","4.2.19","4.2.18","5.1.5","4.2.17","5.1.4","5.1.3","5.1.2","4.2.16","5.1.1","5.1","4.2.15","5.1rc1","4.2.14","5.1b1","5.1a1","4.2.13","4.2.12","4.2.11","4.2.10","4.2.9","4.2.8","4.2.7","4.2.6","4.2.5","4.2.4","4.2.3","4.2.2","4.2.1","4.2","4.2rc1","4.2b1","4.2a1","1.7a2","1.4","1.3","1.2.1","1.2","1.1","1.0"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-59682.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N"}]}