SQL Injection in Djangoproject Django
CVE-2025-64459
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.
Vulnerability class: SQL Injection
Published · last modified .
CVSS v3 metric
CVSS v3 base score 9.1 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
EPSS exploit prediction
EPSS 0.193, 97.4th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Djangoproject Django — versions 5.2, 5.2.8, 5.1
Weakness classification (CWE)
Public exploits and proof-of-concept code
10 public repositories with exploit or proof-of-concept code for this CVE:
- 0xCyberstan/CVE-2025-64459-Poc (2 stars, last pushed 2025-12-01): Vulnerability: SQL Injection via QuerySet and Q() keyword argument unpacking. CVE ID: CVE-2025-64459 Severity: Critical (CVSS 9.1) Affected Versions: Django 5.1 < 5.1.14, 4.2 < 4.2.26, and 5.2 < 5.2…
- omarkurt/django-connector-CVE-2025-64459-testbed (2 stars, last pushed 2025-11-21): A self-contained testbed for Django CVE-2025-64459. Demonstrates QuerySet.filter() parameter injection via dictionary expansion using Docker.
- nunpa/CVE-2025-64459 (1 star, last pushed 2025-11-13): check if vulnerable python-django version to CVE-2025-64459 bug
- YouGina/CVE-2025-64459 (last pushed 2026-08-11): CVE-2025-64459 vulnerable by design app
- rafaelchriss/RedTeamBrasil-CVE-2025-64459 (last pushed 2026-07-07): NEO-SQLi — exploit Django _connector SQL Injection (CVE-2025-64459) | canal RedTeam Brasil
- joshualent/django-cve-2025-64459 (last pushed 2026-06-23): demo application showing off SQL Injection exploit in django 5.2.7
- purehate/CVE-2025-64459-hunter (last pushed 2026-02-15): CVE-2025-64459-hunter
- alxsourin/Helpdesk-Telecom-CVE-2025-64459 (last pushed 2026-01-09)
- Z3YR0xX/CVE-2025-64459 (last pushed 2025-12-05)
- rockmelodies/django_sqli_target_CVE-2025-64459 (last pushed 2025-11-06)
References
- Django security archive (vendor-advisory, Vendor Advisory)
- Django releases announcements (mailing-list, Mailing List)
- Django security releases issued: 5.2.8, 5.1.14, and 4.2.26 (vendor-advisory, Vendor Advisory)
- shivasurya.me/security/django/2025/11/07/django-sql-injection-CVE-2025-64459.ht… (Exploit, Third Party Advisory)
This CVE has public exploit evidence. See the latest CVEs with public exploits.