Advisory

Django releases update, patches critical SQL injection flaw and Denial-of-Service condition

Take action: If you use Django web framework (versions 4.2, 5.1, or 5.2), plan a quick update to the patched versions (4.2.26, 5.1.14, or 5.2.8). The main problem is the SQL injection flaw. And by design most Django apps are accessible on the internet, so you can't really hide the server from attackers.


Learn More

The Django Software Foundation has released security updates patching multiple security vulnerabilities in the Django framework, at least one critical.

Vulnerabilities summary

  • CVE-2025-64459 (CVSS score 9.4): SQL injection via _connector keyword argument in QuerySet and Q objects. The flaw affects QuerySet.filter(), QuerySet.exclude(), and QuerySet.get() methods, as well as the Q() class. The insufficient input validation of the _connector parameter enables attackers to inject arbitrary SQL commands into database queries, potentially enabling unauthorized access to sensitive data, modification of database records, or complete deletion of critical information
  • CVE-2025-64458 (CVSS score 7.8): Denial-of-service vulnerability in HttpResponseRedirect and HttpResponsePermanentRedirect on Windows. The execution of NFKC normalization operations in Python when running on Windows systems is much slower compared to other operating systems. Attackers can exploit this performance disparity by crafting malicious HTTP requests containing extraordinarily large numbers of Unicode characters, forcing the normalization process to consume excessive CPU resources and system memory. 

Affected versions are Django main branch, Django 6.0 (currently in beta status), Django 5.2, Django 5.1, and Django 4.2. Earlier unsupported Django series, including versions 5.0.x, 4.1.x, and 3.2.x, are not formally evaluated by the Django security team and may also be vulnerable to these exploits. 

The patched releases Django 5.2.8, 5.1.14, and 4.2.26 are available for download from the official Django website. 

All Django users should schedule upgrades to the patched release based on their deployment version. 

Django releases update, patches critical SQL injection flaw and Denial-of-Service condition