djangoproject Django
At a glance
- Source
- NVD
- EPSS
- EPSS 0.64 % · percentile 51 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- mitre
- NVD status
- Modified
Description
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).
Weaknesses (CWE)
- CWE-89 — Improper Neutralization of Special Elements used in an SQL Command
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| 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 | mitre |
| 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 | NVD · cve@mitre.org (Secondary) |
| CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NVD · nvd@nist.gov (Primary) |
Advisories
- GHSA-hpr9-3m2g-3j9p — Django vulnerable to SQL injection in column aliases
- PYSEC-2025-106 — 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 Q
European references
- ENISA EUVD · EUVD-2025-32691
- GCVE · GCVE-0-2025-59681
Affected configurations (NVD CPE)
cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*≥ 4.2 < 4.2.25cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*≥ 5.1 < 5.1.13cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*≥ 5.2 < 5.2.7
Affected products
| Product | Versions |
|---|---|
| djangoproject · Django | affected 4.2 < 4.2.25 ; affected 5.1 < 5.1.13 ; affected 5.2 < 5.2.7 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |