SQL injection in djangoproject Django
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 11 fixed, 3 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-89.
Summary
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().
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| djangoproject | Django | 4.2 to before 4.2.24; 5.1 to before 5.1.12; 5.2 to before 5.2.6 | 4.2.24, 5.1.12, 5.2.6 | Patch available | CNA |
| — | Django (PyPI) | before 4.2.24 | 4.2.24 | Patch available | GHSA-6w2r-r2m5-xq5w |
| — | Django (PyPI) | 5.0a1 to before 5.1.12 | 5.1.12 | Patch available | GHSA-6w2r-r2m5-xq5w |
| — | Django (PyPI) | 5.2a1 to before 5.2.6 | 5.2.6 | Patch available | GHSA-6w2r-r2m5-xq5w |
- Django Vendordjangoproject Affected 4.2 to before 4.2.24; 5.1 to before 5.1.12; 5.2 to before 5.2.6 Fixed in 4.2.24, 5.1.12, 5.2.6 Patch available CNA
- Django (PyPI) Vendor— Affected before 4.2.24 Fixed in 4.2.24 Patch available GHSA-6w2r-r2m5-xq5w
- Django (PyPI) Vendor— Affected 5.0a1 to before 5.1.12 Fixed in 5.1.12 Patch available GHSA-6w2r-r2m5-xq5w
- Django (PyPI) Vendor— Affected 5.2a1 to before 5.2.6 Fixed in 5.2.6 Patch available GHSA-6w2r-r2m5-xq5w
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* | 4.2 to before 4.2.24; 5.1 to before 5.1.12; 5.2 to before 5.2.6 | Vulnerable | djangoproject |
- cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* Versions 4.2 to before 4.2.24; 5.1 to before 5.1.12; 5.2 to before 5.2.6 Vulnerable ·djangoproject
Remediation
- Fix · CNA Django (djangoproject) Fixed in 4.2.24, 5.1.12, 5.2.6
- Fix · GHSA-6w2r-r2m5-xq5w Django (PyPI) Fixed in 4.2.24 Advisory →
- Fix · GHSA-6w2r-r2m5-xq5w Django (PyPI) Fixed in 5.1.12 Advisory →
- Fix · GHSA-6w2r-r2m5-xq5w Django (PyPI) Fixed in 5.2.6 Advisory →
Red Hat 10 advisories
- RHSA-2025:17614 Released 2025-10-08 · Red Hat rating ImportantSatellite 6.15.5.5 Async Update
- Red Hat Satellite 6.15 for RHEL 8 cjson-1.7.18-2.el8sat, puppet-agent-7.34.0-4.el8sat, python-django-4.2.24-0.1.el8pc +1
- RHSA-2025:17613 Released 2025-10-08 · Red Hat rating ImportantSatellite 6.16.5.4 Async Update
- Red Hat Satellite 6.16 for RHEL 8 cjson-1.7.18-2.el8sat, puppet-agent-8.8.1-3.el8sat, python-django-4.2.24-0.1.el8pc +1
- Red Hat Satellite 6.16 for RHEL 9 cjson-1.7.18-2.el9sat, puppet-agent-8.8.1-3.el9sat, python-django-4.2.24-0.1.el9pc +1
- RHSA-2025:17606 Released 2025-10-08 · Red Hat rating ImportantSatellite 6.17.5 Async Update
- Red Hat Satellite 6.17 for RHEL 9 cjson-1.7.18-2.el9sat, puppet-agent-8.8.1-3.el9sat, python-django-4.2.24-0.1.el9pc +1
Show 7 more Red Hat advisories
- RHSA-2025:17500 Released 2025-10-07 · Red Hat rating ImportantRed Hat OpenStack Services on OpenShift 18.0 (python-django) security update
- Red Hat OpenStack Services on OpenShift 18.0 python-django-3.2.12-9.el9ost, python3-django-3.2.12-9.el9ost
- RHSA-2025:17499 Released 2025-10-07 · Red Hat rating ImportantRed Hat OpenStack Platform 16.2 (python-django20) security update
- Red Hat OpenStack Platform 16.2 python-django20-2.0.13-20.el8ost, python3-django20-2.0.13-20.el8ost
- RHSA-2025:17498 Released 2025-10-07 · Red Hat rating ImportantRed Hat OpenStack Platform 17.1 (python-django) security update
- Red Hat OpenStack Platform 17.1 python-django-2.2.24-12.el9ost, python3-django-2.2.24-12.el9ost
- RHSA-2025:16514 Released 2025-09-23 · Red Hat rating ImportantRed Hat Ansible Automation Platform 2.5 Container Release Update
- Red Hat Ansible Automation Platform 2.5 for RHEL 8 ansible-automation-platform-25/lightspeed-chatbot-rhel8, ansible-automation-platform-25/lightspeed-rhel8
- RHSA-2025:16487 Released 2025-09-23 · Red Hat rating ImportantRed Hat Ansible Automation Platform 2.5 Product Security and Bug Fix Update
- Red Hat Ansible Automation Platform 2.5 for RHEL 8 automation-controller-venv-tower-4.6.20-1.el8ap, python3.11-django-4.2.24-1.el8ap
- Red Hat Ansible Automation Platform 2.5 for RHEL 9 automation-controller-venv-tower-4.6.20-1.el9ap, python3.11-django-4.2.24-1.el9ap
- RHSA-2025:16404 Released 2025-09-22 · Red Hat rating ImportantRed Hat Ansible Automation Platform 2.4 Container Release Update
- Red Hat Ansible Automation Platform 2.4 for RHEL 8 ansible-automation-platform-24/lightspeed-rhel8
- RHSA-2025:16403 Released 2025-09-22 · Red Hat rating ImportantRed Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update
- Red Hat Ansible Automation Platform 2.4 for RHEL 8 python39-django-4.2.24-1.el8ap, python3x-django-4.2.24-1.el8ap
- Red Hat Ansible Automation Platform 2.4 for RHEL 9 python-django-4.2.24-1.el9ap, python3-django-4.2.24-1.el9ap
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet |
| Red Hat Certification for Red Hat Enterprise Linux 7 | Affected | No fix yet: Fix deferred |
| Red Hat Update Infrastructure 4 for Cloud Providers | Affected | No fix planned: Will not fix |
| Red Hat Ansible Automation Platform 2.4 for RHEL 8 | Fixed | RHSA-2025:16403, RHSA-2025:16404 |
| Red Hat Ansible Automation Platform 2.4 for RHEL 9 | Fixed | RHSA-2025:16403 |
| Red Hat Ansible Automation Platform 2.5 for RHEL 8 | Fixed | RHSA-2025:16487, RHSA-2025:16514 |
| Red Hat Ansible Automation Platform 2.5 for RHEL 9 | Fixed | RHSA-2025:16487 |
| Red Hat OpenStack Platform 16.2 | Fixed | RHSA-2025:17499 |
| Red Hat OpenStack Platform 17.1 | Fixed | RHSA-2025:17498 |
| Red Hat OpenStack Services on OpenShift 18.0 | Fixed | RHSA-2025:17500 |
| Red Hat Satellite 6.15 for RHEL 8 | Fixed | RHSA-2025:17614 |
| Red Hat Satellite 6.16 for RHEL 8 | Fixed | RHSA-2025:17613 |
| Red Hat Satellite 6.16 for RHEL 9 | Fixed | RHSA-2025:17613 |
| Red Hat Satellite 6.17 for RHEL 9 | Fixed | RHSA-2025:17606 |
Not affected: 10 products
- OpenShift Service Mesh 3
- Red Hat Ansible Automation Platform 2
- Red Hat Ansible Automation Platform 2.4 for RHEL 8
- Red Hat Ansible Automation Platform 2.4 for RHEL 9
- Red Hat Ansible Automation Platform 2.5 for RHEL 8
- Red Hat Ansible Automation Platform 2.5 for RHEL 9
- Red Hat Satellite 6.15 for RHEL 8
- Red Hat Satellite 6.16 for RHEL 8
- Red Hat Satellite 6.16 for RHEL 9
- Red Hat Satellite 6.17 for RHEL 9
Timeline
- 2026-10-02 Threatist record created from CVE-2025-57833
- 2026-10-03 Alias added: GHSA-6w2r-r2m5-xq5w
References
Advisory 4
Other 9
- https://github.com/django/django/commit/102965ea93072fe3c39a30be437c683ec1106ef5
- https://github.com/django/django/commit/31334e6965ad136a5e369993b01721499c5d1a92
- https://github.com/django/django/commit/4c044fcc866ec226f612c475950b690b0139d243
- https://docs.djangoproject.com/en/dev/releases/security
- https://github.com/django/django
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-105.yaml
- https://lists.debian.org/debian-lts-announce/2025/09/msg00017.html
- https://www.djangoproject.com/weblog/2025/sep/03/security-releases
- http://www.openwall.com/lists/oss-security/2025/09/03/3
More djangoproject Django vulnerabilities
- TI-2022-15177 An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. CVSS 3.1CRITICAL 9.8
- TI-2020-05994 Django 1.11 before 1.11.28, 2.2 before 2.2.10, and 3.0 before 3.0.3 allows SQL Injection… CVSS 3.1CRITICAL 9.8
- TI-2023-10198 An issue was discovered in the Multipart Request Parser in Django 3.2 before 3.2.18, 4.0… CVSS 3.1HIGH 7.5
- TI-2019-14306 Django before 1.11.27, 2.x before 2.2.9, and 3.x before 3.0.1 allows account takeover. CVSS 3.1CRITICAL 9.8
- TI-2019-10595 An issue was discovered in Django 1.11.x before 1.11.23, 2.1.x before 2.1.11, and 2.2.x… CVSS 3.0CRITICAL 9.8
- TI-2021-14006 Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection… CVSS 3.1CRITICAL 9.8
Sources
- CVE-2025-57833 · CVE Program
- CVE-2025-57833 · NVD
- FIRST EPSS
- GHSA-6w2r-r2m5-xq5w · GitHub Advisory Database · CC BY 4.0
- CVE-2025-57833 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences