Djangoproject Django
Potential SQL injection via _connector keyword argument in QuerySet and Q objects
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 5.2, < 5.2.8
- >= 5.1, < 5.1.14
- >= 4.2, < 4.2.26
Fixed in 5.2.8, 5.1.14, 4.2.26
Mitigation
Upgrade Django to 5.2.8 or 5.1.14 or 4.2.26 or later.
References
- Vendor advisory docs.djangoproject.com/en/dev/releases/security
- Vendor advisory djangoproject.com/weblog/2025/nov/05/security-release…
Timeline
Days relative to CVE publicationFirst public PoC 26 days after publication; not in CISA KEV. First PoC: 0xCyberstan/CVE-2025-64459-Poc (created 1 Dec 2025, found by us: backfilled).
PoC repositories
Found on GitHub.7 PoCs · 4 informational
PoCs 7
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| 0xCyberstan/CVE-2025-64459-Poc | 1 Dec 2025 +26 d | 2 | PoC |
| Z3YR0xX/CVE-2025-64459 | 5 Dec 2025 +30 d | 0 | PoC |
| alxsourin/Helpdesk-Telecom-CVE-2025-64459 | 8 Jan 2026 +64 d | 0 | PoC |
| purehate/CVE-2025-64459-hunter | 14 Jan 2026 +70 d | 0 | PoC |
| joshualent/django-cve-2025-64459 | 9 Mar 2026 +124 d | 0 | PoC via PoC Index |
| rafaelchriss/RedTeamBrasil-CVE-2025-64459 | 7 Jul 2026 +244 d | 0 | PoC |
| YouGina/CVE-2025-64459 | 11 Aug 2026 +279 d | 0 | PoC |
Informational 4
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| rockmelodies/django_sqli_target_CVE-2025-64459 | 6 Nov 2025 +17 h | 0 | Informational · write-up |
| nunpa/CVE-2025-64459 | 10 Nov 2025 +4.9 d | 1 | Informational · detection
Flags · score 15
Below the suspicion threshold (50); does not change the assessment. |
| omarkurt/django-connector-CVE-2025-64459-testbed | 21 Nov 2025 +16 d | 2 | Informational · write-up |
| Lucas-Cyber-Security/CVE_Projects | 1 Dec 2025 +26 d | 0 | Informational · write-up |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| Exploit-DB | Django 5.1.13 - SQL Injection | 3 Dec 2025 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 7 PoC reposGET /
- Query
_negated=Trueis_public=False- Ports
- 8054
- Seen in
- 1 repo: Z3YR0xX/CVE-2025-64459
- Evidence
- Z3YR0xX/CVE-2025-64459/README.md:32 Z3YR0xX/CVE-2025-64459/README.md:35
GET /login/
- Query
username=admin_connector=ORis_superuser=True_negated=True- Ports
- 8054
- Seen in
- 1 repo: Z3YR0xX/CVE-2025-64459
- Evidence
- Z3YR0xX/CVE-2025-64459/README.md:23 Z3YR0xX/CVE-2025-64459/README.md:26
GET /{var}
- Query
__rtb_probe__=1- Ports
- 8080
- Seen in
- 1 repo: rafaelchriss/RedTeamBrasil-CVE-2025-64459
- Evidence
- rafaelchriss/RedTeamBrasil-CVE-2025-64459/rtb_connector_sqli.py:172
POST /
- Body markers
csrfmiddlewaretoken=search=ANDinapplication/x-www-form-urlencoded- Ports
- 80
- Seen in
- 1 repo: purehate/CVE-2025-64459-hunter
- Evidence
- purehate/CVE-2025-64459-hunter/cve_2025_64459_hunter.py:84 purehate/CVE-2025-64459-hunter/cve_2025_64459_hunter.py:94
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/\?(?:.*&)?_negated=True.*is_public=False
(?i)^/login/\?(?:.*&)?username=admin.*_connector=OR.*is_superuser=True.*_negated=True
(?i)^/[^/?#]*\?(?:.*&)?__rtb_probe__=1
(?i)^/(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [8054] (msg:"GG PoC-Monitor CVE-2025-64459 djangoproject Django exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"_negated=True"; http.uri; content:"is_public=False"; reference:url,poc.griffinguard.io/cve/CVE-2025-64459; classtype:web-application-attack; sid:9215257; rev:1;)
alert http any any -> $HOME_NET [8054] (msg:"GG PoC-Monitor CVE-2025-64459 djangoproject Django exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/login/"; http.uri; content:"username=admin"; http.uri; content:"_connector=OR"; http.uri; content:"is_superuser=True"; http.uri; content:"_negated=True"; reference:url,poc.griffinguard.io/cve/CVE-2025-64459; classtype:web-application-attack; sid:9122147; rev:1;)
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2025-64459 djangoproject Django exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"__rtb_probe__=1"; reference:url,poc.griffinguard.io/cve/CVE-2025-64459; classtype:web-application-attack; sid:9307482; rev:1;)
alert http any any -> $HOME_NET [80] (msg:"GG PoC-Monitor CVE-2025-64459 djangoproject Django exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.request_body; content:"csrfmiddlewaretoken="; http.request_body; content:"search=AND"; reference:url,poc.griffinguard.io/cve/CVE-2025-64459; classtype:web-application-attack; sid:9478619; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: djangoproject Django exploit attempt (CVE-2025-64459)
id: gg-pocmon-cve-2025-64459-9215257
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-64459. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-64459
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-query|contains|all:
- '_negated=True'
- 'is_public=False'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2025.64459
title: djangoproject Django exploit attempt (CVE-2025-64459)
id: gg-pocmon-cve-2025-64459-9122147
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-64459. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-64459
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/login/'
cs-uri-query|contains|all:
- 'username=admin'
- '_connector=OR'
- 'is_superuser=True'
- '_negated=True'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2025.64459
title: djangoproject Django exploit attempt (CVE-2025-64459)
id: gg-pocmon-cve-2025-64459-9307482
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-64459. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-64459
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-query|contains|all:
- '__rtb_probe__=1'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2025.64459
title: djangoproject Django exploit attempt (CVE-2025-64459)
id: gg-pocmon-cve-2025-64459-9478619
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-64459. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-64459
logsource:
category: webserver
detection:
selection:
cs-method: POST
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2025.64459