CVE-2021-35042

CRITICALNVD 9.89.8
EchelonGraph scoreHIGH confidence

Score elevated to 9.8 because EPSS predicts 90% probability of exploitation within the next 30 days (top 0.4% of all CVEs). NVD baseline CVSS 9.8 retained for reference. Confidence: see factors.

Triggered by: EPSS exploit prediction ≥85%
Sources: epss, nvd
Elevated
9.8
EchelonGraph verdictPlan a fixSerious severity, but no confirmed exploitation yet.
  • High severity, but no confirmed exploitation yet
CISA-KEV: Not listedEPSS: 44%CVSS: 9.8Exploit: NoneExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

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.

CVSS v3
9.8
EG Score
9.8(high)
EPSS
98.6%
KEV
Not listed

Published

July 2, 2021

Last Modified

November 21, 2024

Advisory Details (5)

Auto-updated Jun 21, 2026
No patch confirmed yet.
generic

[SECURITY] Fedora 34 Update: python-django-3.1.13-1.fc34 - package-announce - Fedora mailing-lists

https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SS6NJTBYWOX6J7G4U3LUOILARJKWPQ5Y/
generic

Archive of security issues | Django documentation | Django

https://docs.djangoproject.com/en/3.2/releases/security/
generic

oss-security - Django: CVE-2021-35042: Potential SQL injection via unsanitized QuerySet.order_by() input

https://www.openwall.com/lists/oss-security/2021/07/02/2
generic

Django security releases issued: 3.2.5 and 3.1.13 | Weblog | Django

https://www.djangoproject.com/weblog/2021/jul/01/security-releases/

Affected Packages

(1 across 1 ecosystem)
PyPI(1)
PackageVulnerable rangeFixed inDependents
django3.1 ... 3.2.4 (18 versions)3.2.5

Weakness Classification(1)

MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.

Data Freshness Timeline

(refreshed 12× in last 7d / 35× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

  1. 2026-07-22 14:06 UTCEPSS rescore
  2. 2026-07-22 14:06 UTCEPSS rescore
  3. 2026-07-21 15:22 UTCEPSS rescore
  4. 2026-07-21 15:22 UTCEPSS rescore
  5. 2026-07-20 17:05 UTCEPSS rescore
  6. 2026-07-19 14:29 UTCEPSS rescore
  7. 2026-07-19 14:29 UTCEPSS rescore
  8. 2026-07-18 17:29 UTCOSV refresh
  9. 2026-07-18 10:02 UTCEPSS rescore
  10. 2026-07-18 10:02 UTCEPSS rescore
  11. 2026-07-16 17:00 UTCEPSS rescore
  12. 2026-07-16 17:00 UTCEPSS rescore
  13. 2026-07-15 16:55 UTCEPSS rescore
  14. 2026-07-15 01:58 UTCEPSS rescore
  15. 2026-07-13 22:27 UTCEPSS rescore
  16. 2026-07-13 06:10 UTCEPSS rescore
  17. 2026-07-12 05:44 UTCEPSS rescore
  18. 2026-07-12 05:44 UTCEPSS rescore
  19. 2026-07-11 08:25 UTCEPSS rescore
  20. 2026-07-11 08:25 UTCEPSS rescore
  21. 2026-07-09 19:07 UTCEPSS rescore
  22. 2026-07-08 15:12 UTCEPSS rescore
  23. 2026-07-04 06:29 UTCEPSS rescore
  24. 2026-07-04 06:29 UTCEPSS rescore
  25. 2026-07-01 15:04 UTCEPSS rescore
Show 33 more
  1. 2026-07-01 00:18 UTCOSV refresh
  2. 2026-06-28 04:54 UTCEPSS rescore
  3. 2026-06-28 04:54 UTCEPSS rescore
  4. 2026-06-27 03:06 UTCEPSS rescore
  5. 2026-06-25 13:48 UTCEPSS rescore
  6. 2026-06-25 13:48 UTCEPSS rescore
  7. 2026-06-24 14:03 UTCEPSS rescore
  8. 2026-06-24 14:03 UTCEPSS rescore
  9. 2026-06-23 21:31 UTCEPSS rescore
  10. 2026-06-23 21:31 UTCEPSS rescore
  11. 2026-06-22 14:24 UTCEPSS rescore
  12. 2026-06-22 14:24 UTCEPSS rescore
  13. 2026-06-21 01:58 UTCEPSS rescore
  14. 2026-06-21 01:58 UTCEPSS rescore
  15. 2026-06-18 17:51 UTCEPSS rescore
  16. 2026-06-18 17:51 UTCEPSS rescore
  17. 2026-06-17 17:51 UTCEPSS rescore
  18. 2026-06-16 17:51 UTCEPSS rescore
  19. 2026-06-16 17:51 UTCEPSS rescore
  20. 2026-06-15 17:46 UTCEPSS rescore
  21. 2026-06-14 23:15 UTCEPSS rescore
  22. 2026-06-13 22:58 UTCEPSS rescore
  23. 2026-06-13 22:58 UTCEPSS rescore
  24. 2026-06-13 02:44 UTCOSV refresh
  25. 2026-06-12 23:10 UTCEPSS rescore
  26. 2026-06-12 23:10 UTCEPSS rescore
  27. 2026-06-10 22:16 UTCEPSS rescore
  28. 2026-06-05 22:45 UTCEPSS rescore
  29. 2026-06-01 13:50 UTCEPSS rescore
  30. 2026-06-01 13:50 UTCEPSS rescore
  31. 2026-05-28 13:43 UTCEPSS rescore
  32. 2026-05-28 13:43 UTCEPSS rescore
  33. 2026-05-26 14:13 UTCEG score recompute

Publicly available exploits

(3 references)

Working exploit code is in the public domain (3 GitHub PoCs). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.

  • GitHub PoCzer0qs/CVE-2021-35042
    First seen Apr 25, 2022

    A basic analysis about CVE-2021-35942. SQL injection in Django.

    Open source ↗
  • GitHub PoCr4vi/CVE-2021-35042
    First seen Sep 24, 2021
    Open source ↗
  • GitHub PoCYouGina/CVE-2021-35042
    First seen Jul 10, 2021

    SQL injection via unsanitized QuerySet.order_by() input

    Open source ↗

Frequently asked(5)

What is CVE-2021-35042?
CVE-2021-35042 is a critical vulnerability published on July 2, 2021. Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.orderby SQL injection if orderby is untrusted input from a client of a web application.
When was CVE-2021-35042 disclosed?
CVE-2021-35042 was first published in the National Vulnerability Database on July 2, 2021, with the most recent update on November 21, 2024. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
Is CVE-2021-35042 actively exploited?
CVE-2021-35042 is not currently on CISA's Known Exploited Vulnerabilities catalog. FIRST EPSS estimates a 98.6% percentile likelihood of exploitation in the next 30 days — higher percentiles indicate greater predicted risk.
What is the CVSS score of CVE-2021-35042?
CVE-2021-35042 has a CVSS v3 base score of 9.8 (NVD).
How do I remediate CVE-2021-35042?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2021-35042, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

See which npm, PyPI, Go, and Maven packages are affected by CVE-2021-35042

Explore →

Is Your Infrastructure Affected by CVE-2021-35042?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.