CVE-2025-64459
Potential SQL injection via _connector keyword argument in QuerySet and Q objects
Description
An issue was discovered in 5.1 before 5.1.14, 4.2 before 4.2.26, and 5.2 before 5.2.8. The methods `QuerySet.filter()`, `QuerySet.exclude()`, and `QuerySet.get()`, and the class `Q()`, are subject to SQL injection when using a suitably crafted dictionary, with dictionary expansion, as the `_connector` argument. 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 cyberstan for reporting this issue.
INFO
Published Date :
Nov. 5, 2025, 3:15 p.m.
Last Modified :
Nov. 10, 2025, 6:25 p.m.
Remotely Exploit :
Yes !
Source :
6a34fbeb-21d4-45e7-8e0a-62b95bc12c92
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | CRITICAL | 134c704f-9b21-4f2e-91b3-4a467353bcc0 |
Solution
- Update Django to a version that includes the fix.
- Review and sanitize all user-supplied input to QuerySet.
- Avoid using dictionary expansion with `_connector` argument.
- Apply patches or updates provided by the vendor.
Public PoC/Exploit Available at Github
CVE-2025-64459 has a 7 public
PoC/Exploit available at Github.
Go to the Public Exploits tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2025-64459.
| URL | Resource |
|---|---|
| https://docs.djangoproject.com/en/dev/releases/security/ | Vendor Advisory |
| https://groups.google.com/g/django-announce | Mailing List |
| https://www.djangoproject.com/weblog/2025/nov/05/security-releases/ | Vendor Advisory |
| https://shivasurya.me/security/django/2025/11/07/django-sql-injection-CVE-2025-64459.html | Exploit Third Party Advisory |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2025-64459 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2025-64459
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
None
Dockerfile Python Makefile HTML JavaScript TypeScript CSS Shell PowerShell
A self-contained testbed for Django CVE-2025-64459. Demonstrates QuerySet.filter() parameter injection via dictionary expansion using Docker.
django security cve-2025-64459 vt-2025-64459 security-testing security-testbed
CVE-2025-64459
CVE-2025-64500
check if vulnerable python-django version to CVE-2025-64459 bug
Shell
None
https://twitch.tv/mdisec
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2025-64459 vulnerability anywhere in the article.
-
Daily CyberSecurity
Django Team Patches High-Severity SQL Injection Flaw (CVE-2025-64459) and DoS Bug (CVE-2025-64458) in Latest Security Update
The Django Software Foundation (DSF) has released new security updates for multiple branches of the Django web framework, addressing two vulnerabilities — including a high-severity SQL injection flaw ... Read more
The following table lists the changes that have been made to the
CVE-2025-64459 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Nov. 10, 2025
Action Type Old Value New Value Added CPE Configuration OR *cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* versions from (including) 4.2 up to (excluding) 4.2.26 *cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* versions from (including) 5.1 up to (excluding) 5.1.14 *cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* versions from (including) 5.2 up to (excluding) 5.2.8 Added Reference Type DSF: https://docs.djangoproject.com/en/dev/releases/security/ Types: Vendor Advisory Added Reference Type DSF: https://groups.google.com/g/django-announce Types: Mailing List Added Reference Type CVE: https://shivasurya.me/security/django/2025/11/07/django-sql-injection-CVE-2025-64459.html Types: Exploit, Third Party Advisory Added Reference Type DSF: https://www.djangoproject.com/weblog/2025/nov/05/security-releases/ Types: Vendor Advisory -
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 08, 2025
Action Type Old Value New Value Added Reference https://shivasurya.me/security/django/2025/11/07/django-sql-injection-CVE-2025-64459.html -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Nov. 05, 2025
Action Type Old Value New Value Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N -
New CVE Received by 6a34fbeb-21d4-45e7-8e0a-62b95bc12c92
Nov. 05, 2025
Action Type Old Value New Value Added Description An issue was discovered in 5.1 before 5.1.14, 4.2 before 4.2.26, and 5.2 before 5.2.8. The methods `QuerySet.filter()`, `QuerySet.exclude()`, and `QuerySet.get()`, and the class `Q()`, are subject to SQL injection when using a suitably crafted dictionary, with dictionary expansion, as the `_connector` argument. 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 cyberstan for reporting this issue. Added CWE CWE-89 Added Reference https://docs.djangoproject.com/en/dev/releases/security/ Added Reference https://groups.google.com/g/django-announce Added Reference https://www.djangoproject.com/weblog/2025/nov/05/security-releases/