SQL Injection in Djangoproject Django
CVE-2021-35042
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.
Vulnerability class: SQL Injection
Published · last modified .
CVSS v3 metric
CVSS v3 base score 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS 0.444, 98.8th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Djangoproject Django
- Fedoraproject Fedora — versions 34
Weakness classification (CWE)
Public exploits and proof-of-concept code
9 public repositories with exploit or proof-of-concept code for this CVE:
- YouGina/CVE-2021-35042 (13 stars, last pushed 2021-07-10): SQL injection via unsanitized QuerySet.order_by() input
- r4vi/CVE-2021-35042 (5 stars, last pushed 2022-02-10)
- zer0qs/CVE-2021-35042 (2 stars, last pushed 2022-04-29): A basic analysis about CVE-2021-35942. SQL injection in Django.
- vutiendat323/INT14107_CVE-2021-35042 (last pushed 2026-04-18)
- LUUANHDUC/CVE-2021-35042 (last pushed 2023-05-18): Django SQL injection vulnerability
- mrlihd/CVE-2021-35042 (last pushed 2021-09-18): Reproduce CVE-2021-35042
- n3utr1n00/CVE-2021-35042
- WynSon/CVE-2021-35042
- Zh0ngS0n1337/CVE-2021-35042
Also mentioned in 29 other repositories (20142995/nuclei-templates, ARPSyndicate/cvemon, bakery312/Vulhub-Reproduce, …). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- groups.google.com/forum/
- docs.djangoproject.com/en/3.2/releases/security/ (Patch, Vendor Advisory)
- www.openwall.com/lists/oss-security/2021/07/02/2 (Patch, Mailing List, Third Party Advisory)
- www.djangoproject.com/weblog/2021/jul/01/security-releases/ (Patch, Vendor Advisory)
- security.netapp.com/advisory/ntap-20210805-0008/ (Third Party Advisory)
- FEDORA-2021-78e501d62a (vendor-advisory)
This CVE has public exploit evidence. See the latest CVEs with public exploits.