CVE-2025-57833
HIGH 8.1CVSS 3.1Django is subject to SQL injection through its column aliases
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().
- Published
- 3 Sep 2025
- Last modified
- 10 Sep 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-89
- Also known as
- BIT-django-2025-57833GHSA-6w2r-r2m5-xq5wPYSEC-2025-105
- Sources
- NVDJSONOSV GHSA-6w2r-r2m5-xq5wJSONOSV PYSEC-2025-105JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | PyPA | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | cve@mitre.org (Secondary) | CVSS 3.1 | HIGH 7.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | djangoproject | djangocpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* |
>= 4.2, < 4.2.24 | 4.2.24 |
| NVD | djangoproject | djangocpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* |
>= 5.1, < 5.1.12 | 5.1.12 |
| NVD | djangoproject | djangocpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* |
>= 5.2, < 5.2.6 | 5.2.6 |
| OSV | PyPI | django | < 4.2.24 | 4.2.24 |
| OSV | PyPI | django | >= 5.0a1, < 5.1.12 | 5.1.12 |
| OSV | PyPI | django | >= 5.2a1, < 5.2.6 | 5.2.6 |
| OSV | PyPI | django | >= 4.2, < 4.2.24; >= 5.1, < 5.1.12; >= 5.2, < 5.2.6 | 4.2.24, 5.1.12, 5.2.6 |
References
- https://docs.djangoproject.com/en/dev/releases/security/ · Vendor Advisory, WEB, ADVISORY
- https://groups.google.com/g/django-announce · Vendor Advisory, WEB, ADVISORY
- https://medium.com/@EyalSec/django-unauthenticated-0-click-rce-and-sql-injection-using-default-configuration-059964f3f898 · Exploit, Third Party Advisory, WEB, EVIDENCE
- https://www.djangoproject.com/weblog/2025/sep/03/security-releases/ · Vendor Advisory, WEB, ADVISORY
- http://www.openwall.com/lists/oss-security/2025/09/03/3 · WEB
- https://lists.debian.org/debian-lts-announce/2025/09/msg00017.html · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-57833 · ADVISORY
- https://github.com/django/django/commit/102965ea93072fe3c39a30be437c683ec1106ef5 · WEB
- https://github.com/django/django/commit/31334e6965ad136a5e369993b01721499c5d1a92 · WEB
- https://github.com/django/django/commit/4c044fcc866ec226f612c475950b690b0139d243 · WEB
- https://github.com/django/django · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-105.yaml · WEB
- https://github.com/advisories/GHSA-6w2r-r2m5-xq5w · ADVISORY
History
- 25 Nov 2026 20:58 UTC · NVD: first stored (published 3 Sep 2025)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 3 Sep 2025)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 8 Sep 2025)