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.
- Published
- Jul 2, 2021
- Updated
- Aug 4, 2024
- Assigning CNA
- mitre
- Evidence observed
- Aug 8, 2026
Primary CVSS
nvd · CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HModerate · next 30 days
- Percentile
- 98.8%
- Model date
- Oct 19, 2026
EPSS is a statistical estimate, not a certainty or a measure of impact. Combine it with CVSS, KEV status, exposure and your environment.
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.
Sources
django/CVE-2021-35042
Django QuerySet.order_by() SQL Injection (CVE-2021-35042)
Vulhub vulnerability labsDeclared conditions
- lab image version: vulhub/django:3.2.4(django/CVE-2021-35042/docker-compose.yml:services.web.image)
- lab image version: mysql:5.7(django/CVE-2021-35042/docker-compose.yml:services.db.image)
Django SQL injection vulnerability
Interactive proof-of-concept demonstrating Django SQL injection (CVE-2021-35042) with step-by-step exploitation against SQLite and PostgreSQL databases.
Responsible use
Use vulnerability information only on systems you own or are authorized to test. Kitploit links to public research metadata and does not store exploit code or malicious payloads.