An issue was discovered in Django 4.2 before 4.2.25, 5.1 before 5.1.13, and 5.2 before 5.2.7. QuerySet.annotate(), QuerySet.alias(), QuerySet.aggregate(), and QuerySet.extra() are subject to SQL injection in column aliases, when using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed to these methods (on MySQL and MariaDB).
CVSS Details
- CVSS 3.1 Base Score: 7.1
- CVSS 3.1 Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Alpine Linux | — | Upgrade py3-django | Oct 8, 2025 | Oct 1, 2025 |
| Debian | — | Upgrade python-django | Oct 10, 2025 | Oct 10, 2025 |
| Freebsd | — | Upgrade py310-django51Upgrade py311-django52Upgrade py39-django42Upgrade py311-django42Upgrade py310-django42Upgrade py311-django51Upgrade py310-django52 | Dec 10, 2025 | Oct 2, 2025 |
| Suse | — | Upgrade python311-DjangoUpgrade python313-DjangoUpgrade python3-django | Dec 5, 2025 | Oct 2, 2025 |
| Ubuntu | — | Upgrade python-django (Ubuntu Pro)Upgrade python3-django (Ubuntu Pro)Upgrade python3-django | Oct 2, 2025 | Oct 1, 2025 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub