Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection…
Priority HIGH 71CWE-89Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-89.
Summary
Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection if order_by is untrusted input from a client of a web application.
Why it matters now
EPSS 0.44369 98th percentileScored 2026-11-07
Fix Fixed Django (PyPI): 3.2.5, 3.1.13
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | Django (PyPI) | 3.2a1 to before 3.2.5 | 3.2.5 | Patch available | GHSA-xpfp-f569-q3p2 |
| — | Django (PyPI) | 3.0a1 to before 3.1.13 | 3.1.13 | Patch available | GHSA-xpfp-f569-q3p2 |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- Django (PyPI) Vendor— Affected 3.2a1 to before 3.2.5 Fixed in 3.2.5 Patch available GHSA-xpfp-f569-q3p2
- Django (PyPI) Vendor— Affected 3.0a1 to before 3.1.13 Fixed in 3.1.13 Patch available GHSA-xpfp-f569-q3p2
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* | 3.1 to before 3.1.13; 3.2 to before 3.2.5 | Vulnerable | djangoproject |
| cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* | 34 | Vulnerable | Fedoraproject |
- cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* Versions 3.1 to before 3.1.13; 3.2 to before 3.2.5 Vulnerable ·djangoproject
- cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* Versions 34 Vulnerable ·Fedoraproject
Remediation
- Fix · GHSA-xpfp-f569-q3p2 Django (PyPI) Fixed in 3.2.5 Advisory →
- Fix · GHSA-xpfp-f569-q3p2 Django (PyPI) Fixed in 3.1.13 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
Not affected: 11 products
- Red Hat Ansible Automation Platform 1.2
- Red Hat Ansible Tower 3
- Red Hat Ceph Storage 2
- Red Hat Ceph Storage 3
- Red Hat OpenStack Platform 10 (Newton)
- Red Hat OpenStack Platform 13 (Queens)
- Red Hat OpenStack Platform 16.1
- Red Hat OpenStack Platform 16.2
- Red Hat Satellite 6
- Red Hat Storage 3
- Red Hat Update Infrastructure 3 for Cloud Providers
Timeline
- 2026-10-02 Threatist record created from CVE-2021-35042
- 2026-10-03 Alias added: GHSA-xpfp-f569-q3p2
References
Patch 3
Advisory 4
Other 11
- https://groups.google.com/forum/#%21forum/django-announce
- https://github.com/django/django/commit/0bd57a879a0d54920bb9038a732645fb917040e9
- https://github.com/django/django/commit/a34a5f724c5d5adb2109374ba3989ebb7b11f81f
- https://github.com/django/django/commit/dae83a24519d6f284c74414e0b81d64d9b5a0db4
- https://docs.djangoproject.com/en/3.2/releases/security
- https://github.com/django/django
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-109.yaml
- https://groups.google.com/forum/#!forum/django-announce
- https://lists.fedoraproject.org/archives/list/[email protected]/message/SS6NJTBYWOX6J7G4U3LUOILARJKWPQ5Y
- https://security.netapp.com/advisory/ntap-20210805-0008
- https://www.djangoproject.com/weblog/2021/jul/01/security-releases
Sources
- CVE-2021-35042 · CVE Program
- CVE-2021-35042 · NVD
- FIRST EPSS
- GHSA-xpfp-f569-q3p2 · GitHub Advisory Database · CC BY 4.0
- CVE-2021-35042 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences