Loading advisory.
Loading advisory.
Django is vulnerable to SQL injection in column aliases
An issue was discovered in 5.2 before 5.2.9, 5.1 before 5.1.15, and 4.2 before 4.2.27. FilteredRelation is subject to SQL injection in column aliases, using a suitably crafted dictionary, with dictionary expansion, as the kwargs passed to QuerySet.annotate() or QuerySet.alias() on PostgreSQL.
Published 2025-12-02 15:13 UTC · Modified 2026-09-10 03:50 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| django | PyPI | >= 5.2a1, < 5.2.9 >= 5.1a1, < 5.1.15 >= 4.2a1, < 4.2.27 >= 4.2, < 4.2.27 >= 5.1, < 5.1.15 >= 5.2, < 5.2.9 versions 5.2, 5.2.1, 5.2.2, 5.2.3, 5.2.4, 5.2.5, 5.2.6, 5.2.7, 5.2.8, 5.2a1, 5.2b1, 5.2rc1, 5.1, 5.1.1, 5.1.10, 5.1.11, 5.1.12, 5.1.13, 5.1.14, 5.1.2 and 40 more | 5.2.9, 5.1.15, 4.2.27 | pip install --upgrade 'django>=5.2.9'pip install --upgrade 'django>=5.1.15'pip install --upgrade 'django>=4.2.27' |
An issue was discovered in 5.2 before 5.2.9, 5.1 before 5.1.15, and 4.2 before 4.2.27.
FilteredRelation is subject to SQL injection in column aliases, using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed to QuerySet.annotate() or QuerySet.alias() on PostgreSQL.
Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected.
Django would like to thank Stackered for reporting this issue.
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.009 on 2026-11-24 to 0.005 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.009 | first score | v2026.06.15 |
| 2026-11-26 | 0.005 | 0.009 | v2026.06.15 |