Vulnerability · Published Sep 3, 2025 · Assigned by mitre
CVE-2025-57833
High 7.1
In plain English
A high-severity SQL injection in Django from djangoproject. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 28.3% (higher than 98% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.22 | py3-django | 4.2.24-r0 | ALPINE-CVE-2025-57833 |
| Alpine:v3.23 | py3-django | 4.2.24-r0 | ALPINE-CVE-2025-57833 |
| Alpine:v3.24 | py3-django | 4.2.24-r0 | ALPINE-CVE-2025-57833 |
| Debian:12 | python-django | 3:3.2.25-0+deb12u1 | DSA-6136-1 |
| Debian:12 | python-django | 3:3.2.25-0+deb12u1 | DEBIAN-CVE-2025-57833 |
| Debian:13 | python-django | 3:4.2.27-0+deb13u1 | DSA-6117-1 |
| Debian:13 | python-django | 3:4.2.27-0+deb13u1 | DEBIAN-CVE-2025-57833 |
| Debian:14 | python-django | 3:4.2.24-1 | DEBIAN-CVE-2025-57833 |
| PyPI | django | 4.2.24, 5.1.12, 5.2.6 | PYSEC-2025-105 |
| PyPI | django | 5.2.6 | GHSA-6w2r-r2m5-xq5w |
| PyPI | django | 5.1.12 | GHSA-6w2r-r2m5-xq5w |
| PyPI | django | 4.2.24 | GHSA-6w2r-r2m5-xq5w |
| Ubuntu:22.04:LTS | python-django | 2:3.2.12-2ubuntu1.21 | USN-7736-1 |
| Ubuntu:22.04:LTS | python-django | 2:3.2.12-2ubuntu1.21 | UBUNTU-CVE-2025-57833 |
| Ubuntu:24.04:LTS | python-django | 3:4.2.11-1ubuntu1.10 | UBUNTU-CVE-2025-57833 |
| Ubuntu:24.04:LTS | python-django | 3:4.2.11-1ubuntu1.10 | USN-7736-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| djangoproject | Django | 4.2 – before 4.2.245.1 – before 5.1.125.2 – before 5.2.6 |
Weakness: CWE-89 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N
References
- https://docs.djangoproject.com/en/dev/releases/security/
- https://groups.google.com/g/django-announce
- https://www.djangoproject.com/weblog/2025/sep/03/security-releases/
- https://medium.com/@EyalSec/django-unauthenticated-0-click-rce-and-sql-injection-using-default-configuration-059964f3f898
- https://lists.debian.org/debian-lts-announce/2025/09/msg00017.html
- http://www.openwall.com/lists/oss-security/2025/09/03/3