CVE-2025-64459 Details
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.
A SQL injection vulnerability has been identified in Django versions 5.1 prior to 5.1.14, 4.2 prior to 4.2.26, and 5.2 prior to 5.2.8. The issue arises in the QuerySet methods filter(), exclude(), and get(), as well as the Q() class, when a crafted dictionary with dictionary expansion is used as the _connector argument. This vulnerability allows for malicious SQL injection, potentially compromising the application's database interactions.
Users can upgrade to Django versions 5.1.14, 5.2.8, or 4.2.26 to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Nov 6, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://docs.djangoproject.com/en/dev/releases/security/ | Django Software Foundation | Vendor Advisory |
| https://groups.google.com/g/django-announce | Django Software Foundation | Mailing List |
| https://www.djangoproject.com/weblog/2025/nov/05/security-releases/ | Django Software Foundation | Vendor Advisory |
| https://shivasurya.me/security/django/2025/11/07/django-sql-injection-CVE-2025-64459.html | CVE | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | Django Software Foundation |
Affected Products
| Product | Versions |
|---|---|
| djangoproject django | >= 4.2, < 4.2.26 >= 5.1, < 5.1.14 >= 5.2, < 5.2.8 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | Django Software Foundation |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Nov 10, 2025 | Initial Analysis | [email protected] |
| Nov 8, 2025 | CVE Modified | CVE |
| Nov 5, 2025 | CVE Modified | CISA-ADP |
| Nov 5, 2025 | New CVE Received | Django Software Foundation |