CVE-2025-64460: Django Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-vrcr-9hj9-jcg6
CWE-407
Published
Advisory Summary

CVE-2025-64460 is a MODERATE denial of service vulnerability (CWE-407: Inefficient Algorithmic Complexity) affecting Django libraries in the PyPI ecosystem. The issue involves django is vulnerable to dos via xml serializer text extraction. Remediation is available by upgrading affected packages to version 5.2.9, 5.1.15, 4.2.27.

CVE-2025-64460 at a Glance

CVE Identifier CVE-2025-64460
GHSA Identifier GHSA-vrcr-9hj9-jcg6
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-407: Inefficient Algorithmic Complexity
Affected Product Django
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-64460

To remediate this vulnerability, upgrade all affected Django dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Django fixed: 5.2.9
pip install Django>=5.2.9
Django fixed: 5.1.15
pip install Django>=5.1.15
Django fixed: 4.2.27
pip install Django>=4.2.27
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show Django

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-64460, inspect your installed packages using pip:

pip show Django

Analyze the terminal output to locate any version of Django in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.2.9), your application is affected.

Note: The pip show Django command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-407: Inefficient Algorithmic Complexity, where an algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typically using crafted manipulations that ensure that the worst case is being reached. In Django, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

An issue was discovered in 5.2 before 5.2.9, 5.1 before 5.1.15, and 4.2 before 4.2.27. Algorithmic complexity in `django.core.serializers.xml_serializer.getInnerText()` allows a remote attacker to cause a potential denial-of-service attack triggering CPU and memory exhaustion via specially crafted XML input processed by the XML `Deserializer`. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected. Django would like to thank Seokchan Yoon for reporting this issue.

CVE-2025-64460 Affected Django Versions

3 component(s)
Fixed Versions:
5.2.95.1.154.2.27
Product / Package Ecosystem Affected Versions Fixed Version
Django
PyPI
≥ 5.2a1
< 5.2.9
5.2.9
Django
PyPI
≥ 5.1a1
< 5.1.15
5.1.15
Django
PyPI
≥ 4.2a1
< 4.2.27
4.2.27

References

Frequently Asked Questions

What is CVE-2025-64460?
CVE-2025-64460 is a security vulnerability in Django involving Django is vulnerable to DoS via XML serializer text extraction under CWE-407: Inefficient Algorithmic Complexity.
Which Django versions are affected?
Affected versions include releases prior to 5.2.9, 5.1.15, 4.2.27 across affected packages: Django.
What version fixes CVE-2025-64460?
Upgrading to 5.2.9, 5.1.15, 4.2.27 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Django affected?
Yes, Django is affected in releases prior to 5.2.9, 5.1.15, 4.2.27. Upgrade your dependency to 5.2.9, 5.1.15, 4.2.27 or later.
What CWE is associated with CVE-2025-64460?
CVE-2025-64460 is classified under CWE-407: Inefficient Algorithmic Complexity (An algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typically using crafted manipulations that ensure that the worst case is being reached.).
How can I check PyPI dependencies for CVE-2025-64460?
Run the dependency tree command: 'pip show Django'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vrcr-9hj9-jcg6",
  "modified" : "2026-06-05T14:34:31Z",
  "published" : "2025-12-02T18:30:35Z",
  "aliases" : [ "CVE-2025-64460" ],
  "summary" : "Django is vulnerable to DoS via XML serializer text extraction",
  "details" : "An issue was discovered in 5.2 before 5.2.9, 5.1 before 5.1.15, and 4.2 before 4.2.27.\nAlgorithmic complexity in `django.core.serializers.xml_serializer.getInnerText()` allows a remote attacker to cause a potential denial-of-service attack triggering CPU and memory exhaustion via specially crafted XML input processed by the XML `Deserializer`.\nEarlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected.\nDjango would like to thank Seokchan Yoon for reporting this issue.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.2a1"
      }, {
        "fixed" : "5.2.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.1a1"
      }, {
        "fixed" : "5.1.15"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.2a1"
      }, {
        "fixed" : "4.2.27"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-64460"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/0db9ea4669312f1f4973e09f4bca06ab9c1ec74b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/1dbd07a608e495a0c229edaaf84d58d8976313b5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/4d2b8803bebcdefd2b76e9e8fc528d5fddea93f0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/99e7d22f55497278d0bcb2e15e72ef532e62a31d"
  }, {
    "type" : "WEB",
    "url" : "https://docs.djangoproject.com/en/dev/releases/security"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/django/django"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-109.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/g/django-announce"
  }, {
    "type" : "WEB",
    "url" : "https://www.djangoproject.com/weblog/2025/dec/02/security-releases"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-407" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-03T16:59:02Z",
    "nvd_published_at" : "2025-12-02T16:15:56Z"
  }
}