Skip to content
Heist/ feed
Back to feed
Low

Security advisory

Type: advisorySources: OSVCVE: CVE-2025-59682

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-59682
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 13:19 UTC · Revision 1

Source evidence

CVE-2025-59682

core-osv · Original source

Published 1 Oct 2025, 00:00 UTC

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.

osv:CVE-2025-59682
Complete source record
{
  "id": "b30d75db1057c571201f34aec3330497208838f5ebe715789c671f45d602fccf",
  "url": "https://osv.dev/vulnerability/CVE-2025-59682",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2025-59682",
    "summary": "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.",
    "evidence": "osv:CVE-2025-59682",
    "products": [],
    "severity": "low",
    "structured": {
      "id": "CVE-2025-59682",
      "aliases": [
        "BIT-django-2025-59682",
        "CVE-2025-59682",
        "GHSA-q95w-c7qg-hrff",
        "PYSEC-2026-1296"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/django/django",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "57d20b2485e7cd2f029dbf49fb5510b2a6f12c48"
                },
                {
                  "introduced": "84d09a547fe35e10018ab242602ca76c29ca91a1"
                },
                {
                  "fixed": "467aeeb569da17a7573e8dfc4932434c84e70642"
                },
                {
                  "introduced": "9e7cc2b628fe8fd3895986af9b7fc9525034c1b0"
                },
                {
                  "fixed": "3cff3209e35a560f94801d428cf7f2a3ecb2a051"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.2.0"
                      },
                      {
                        "fixed": "4.2.25"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "5.1"
                      },
                      {
                        "fixed": "5.1.13"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "5.2"
                      },
                      {
                        "fixed": "5.2.7"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "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/cve-osv-conversion/osv-output/CVE-2025-59682.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:35.525045235Z",
      "provider": "osv",
      "references": [
        "https://docs.djangoproject.com/en/dev/releases/security/",
        "https://groups.google.com/g/django-announce",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59682.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-59682",
        "https://www.djangoproject.com/weblog/2025/oct/01/security-releases/"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-23"
        ],
        "cna_assigner": "mitre",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "4.2"
                  },
                  {
                    "fixed": "4.2.25"
                  },
                  {
                    "introduced": "5.1"
                  },
                  {
                    "fixed": "5.1.13"
                  },
                  {
                    "introduced": "5.2"
                  },
                  {
                    "fixed": "5.2.7"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59682.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-59682",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 502973,
  "published_at": "2025-10-01T00:00:00+00:00"
}