django
Affected
- introduced
4.2, fixed4.2.25(ecosystem)
Fixed versions
4.2.25
Fix
- Fixed version
4.2.25pip install --upgrade django==4.2.25
Advisory
Also known as: BIT-django-2025-59681, CVE-2025-59681, PYSEC-2025-106
Django vulnerable to SQL injection in column aliases
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).
High Basis: The source's own band: HIGH
4.2, fixed 4.2.25 (ecosystem)4.2.25
4.2.25pip install --upgrade django==4.2.255.1, fixed 5.1.13 (ecosystem)5.1.13
5.1.13pip install --upgrade django==5.1.135.2, fixed 5.2.7 (ecosystem)5.2.7
5.2.7pip install --upgrade django==5.2.7Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0