Djangoproject Django
An issue was discovered in Django 4.2 before 4.2.24, 5.1 before 5.1.12, and 5.2 before 5.2.6. FilteredRelation is subject to SQL injection in column aliases, using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed QuerySet.annotate() or QuerySet.alias().
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 4.2, < 4.2.24
- >= 5.1, < 5.1.12
- >= 5.2, < 5.2.6
Fixed in 4.2.24, 5.1.12, 5.2.6
Mitigation
Upgrade Django to 4.2.24 or 5.1.12 or 5.2.6 or later.
Timeline
Days relative to CVE publicationFirst public PoC 2.2 days after publication; not in CISA KEV. First PoC: Mkway/CVE-2025-57833 (created 5 Sep 2025, found by us: backfilled).
PoC repositories
Found on GitHub.4 PoCs · 1 suspicious or fake
PoCs 4
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| Mkway/CVE-2025-57833 | 5 Sep 2025 +2.2 d | 2 | PoC |
| ianoboyle/CVE-2025-57833 | 8 Oct 2025 +36 d | 1 | PoC |
| sw0rd1ight/CVE-2025-57833 | 2 Nov 2025 +60 d | 6 | PoC |
| Gayang2902/CVE-2025-57833 | 27 Nov 2025 +85 d | 1 | PoC |
Suspicious or fake 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| loic-houchi/Django-faille-CVE-2025-57833_test | 9 Sep 2025 +6.5 d | 2 | Fake |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 4 PoC reposPOST /api/search
- Body markers
"search_field"inapplication/json- Ports
- 8000
- Seen in
- 1 repo: Mkway/CVE-2025-57833
- Evidence
- Mkway/CVE-2025-57833/CVE-2025-57833.md:86 Mkway/CVE-2025-57833/CVE-2025-57833.md:96 Mkway/CVE-2025-57833/CVE-2025-57833.md:106
POST /book/search
- Body markers
"alias":"XXX""author":"Bob""alias":"XXX;select user --""alias":" using(id);select user --"inapplication/json- Ports
- 8085
- Seen in
- 1 repo: sw0rd1ight/CVE-2025-57833
- Evidence
- sw0rd1ight/CVE-2025-57833/README.md:66 sw0rd1ight/CVE-2025-57833/README.md:86 sw0rd1ight/CVE-2025-57833/README.md:98
GET /api/debug/
- Ports
- 8000
- Seen in
- 1 repo: Mkway/CVE-2025-57833
- Evidence
- Mkway/CVE-2025-57833/document/README.md:512 Mkway/CVE-2025-57833/local_attacks/exploit.py:19
GET /vuln/
- Query
param=malicious_input- Ports
- 8000
- Seen in
- 1 repo: ianoboyle/CVE-2025-57833
- Evidence
- ianoboyle/CVE-2025-57833/exploit.sh:1
POST /api/safe-search/
- Content-Type
application/json- Ports
- 8000
- Seen in
- 1 repo: Mkway/CVE-2025-57833
- Evidence
- Mkway/CVE-2025-57833/document/README.md:501 Mkway/CVE-2025-57833/document/README.md:663
POST /api/vulnerable-search/
- Body markers
"search_field""search_field":"author_join"inapplication/json- Ports
- 8000
- Seen in
- 1 repo: Mkway/CVE-2025-57833
- Evidence
- Mkway/CVE-2025-57833/CVE-2025-57833.md:213 Mkway/CVE-2025-57833/CVE-2025-57833.md:218 Mkway/CVE-2025-57833/DOCKER_README.md:75 Mkway/CVE-2025-57833/DOCKER_README.md:80 Mkway/CVE-2025-57833/README.md:222 Mkway/CVE-2025-57833/document/README.md:493
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/api/search(?:[?#].*)?$
(?i)^/book/search(?:[?#].*)?$
(?i)^/api/debug/(?:[?#].*)?$
(?i)^/vuln/\?(?:.*&)?param=malicious_input
(?i)^/api/safe-search/(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [8000] (msg:"GG PoC-Monitor CVE-2025-57833 djangoproject Django exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/search"; http.request_body; content:"|22|search_field|22|"; reference:url,poc.griffinguard.io/cve/CVE-2025-57833; classtype:web-application-attack; sid:9845876; rev:1;)
alert http any any -> $HOME_NET [8085] (msg:"GG PoC-Monitor CVE-2025-57833 djangoproject Django exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/book/search"; http.request_body; content:"|22|alias|22|:|22|XXX|22|"; http.request_body; content:"|22|author|22|:|22|Bob|22|"; http.request_body; content:"|22|alias|22|:|22|XXX|3b|select user --|22|"; http.request_body; content:"|22|alias|22|:|22| using(id)|3b|select user --|22|"; reference:url,poc.griffinguard.io/cve/CVE-2025-57833; classtype:web-application-attack; sid:9715945; rev:1;)
alert http any any -> $HOME_NET [8000] (msg:"GG PoC-Monitor CVE-2025-57833 djangoproject Django exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/api/debug/"; reference:url,poc.griffinguard.io/cve/CVE-2025-57833; classtype:web-application-attack; sid:9573406; rev:1;)
alert http any any -> $HOME_NET [8000] (msg:"GG PoC-Monitor CVE-2025-57833 djangoproject Django exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/vuln/"; http.uri; content:"param=malicious_input"; reference:url,poc.griffinguard.io/cve/CVE-2025-57833; classtype:web-application-attack; sid:9482813; rev:1;)
alert http any any -> $HOME_NET [8000] (msg:"GG PoC-Monitor CVE-2025-57833 djangoproject Django exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/safe-search/"; reference:url,poc.griffinguard.io/cve/CVE-2025-57833; classtype:web-application-attack; sid:9664289; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: djangoproject Django exploit attempt (CVE-2025-57833)
id: gg-pocmon-cve-2025-57833-9845876
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-57833. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-57833
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/search'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.57833
title: djangoproject Django exploit attempt (CVE-2025-57833)
id: gg-pocmon-cve-2025-57833-9715945
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-57833. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-57833
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/book/search'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.57833
title: djangoproject Django exploit attempt (CVE-2025-57833)
id: gg-pocmon-cve-2025-57833-9573406
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-57833. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-57833
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/api/debug/'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.57833
title: djangoproject Django exploit attempt (CVE-2025-57833)
id: gg-pocmon-cve-2025-57833-9482813
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-57833. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-57833
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/vuln/'
cs-uri-query|contains|all:
- 'param=malicious_input'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.57833
title: djangoproject Django exploit attempt (CVE-2025-57833)
id: gg-pocmon-cve-2025-57833-9664289
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-57833. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-57833
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/safe-search/'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.57833