CVE-2021-35042 — SQL Injection in django — CVE Details
SQL Injection in Django
What Should I Do?
Fix in Your Next Sprint
This vulnerability has a 89.86% chance of being exploited within 30 days.
Summary
Advisory Timeline
- First published September 22, 2021 (1846 days ago).
- Last revised February 21, 2025 — 1247 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "django>=3.2.5"
pip install "django>=3.1.13"
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: pypi (1).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-89SQL InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-35042ADVISORY
- https://github.com/django/django/commit/0bd57a879a0d54920bb9038a732645fb917040e9WEB
- https://github.com/django/django/commit/a34a5f724c5d5adb2109374ba3989ebb7b11f81fWEB
- https://github.com/django/django/commit/dae83a24519d6f284c74414e0b81d64d9b5a0db4WEB
- https://docs.djangoproject.com/en/3.2/releases/securityWEB
- https://github.com/advisories/GHSA-xpfp-f569-q3p2ADVISORY
- https://github.com/django/djangoPACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-109.yamlWEB
- https://groups.google.com/forum/#!forum/django-announceWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SS6NJTBYWOX6J7G4U3LUOILARJKWPQ5YWEB
- https://security.netapp.com/advisory/ntap-20210805-0008WEB
- https://www.djangoproject.com/weblog/2021/jul/01/security-releasesWEB
- https://www.openwall.com/lists/oss-security/2021/07/02/2WEB
Frequently Asked Questions
- What is CVE-2021-35042?
- SQL Injection in Django This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
- How do I check if my project is affected by CVE-2021-35042?
- CVE-2021-35042 affects django. It has a 89.9% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2021-35042 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation is straightforward and causes maximum impact. Patch immediately.
This places it in the top 5% of EPSS-scored vulnerabilities — 99.6% of tracked vulnerabilities score at or below it, so it is far more likely to be exploited than nearly all other tracked vulnerabilities.
Also Known As
Related CVEs
- CVE-2022-23833HIGH
Infinite Loop in Django
- CVE-2025-57833HIGH
Django is subject to SQL injection through its column aliases
- CVE-2021-45116HIGH
Information disclosure in Django
- CVE-2025-48432MEDIUM
Django Improper Output Neutralization for Logs vulnerability
- CVE-2021-32052
- CVE-2021-3281
- CVE-2021-33203
- CVE-2021-33571
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies