Skip to content
Fencer Vulns
critical 9.8

CVE-2021-35042 in the critical feed json

SQL Injection in Django

published 2021-07-02 5 y ago modified 2026-09-08 2 mo ago also BIT-django-2021-35042 , EUVD-2021-0061 , GHSA-xpfp-f569-q3p2 , PYSEC-2021-109

cvss
9.8
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
44.4%
EPSS 44.4% chance of exploitation in 30 days, percentile 98%
public exploits
0
none known

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.

Patch / fix

  • pypi django 3.1.13, 3.2.5
  • bitnami django 3.1.13, 3.2.5
  • djangoproject django 3.1.13, 3.2.5
  • python-Django5 openSUSE Tumbleweed 5.2.16-1.1
  • python-Django openSUSE Tumbleweed 5.2.16-1.1
  • python-Django4 openSUSE Tumbleweed 4.2.30-4.1
  • python-Django6 openSUSE Tumbleweed 6.0-1.1
  • python-Django4 openSUSE Tumbleweed 4.2.14-1.1
  • python-Django openSUSE Tumbleweed 3.2.7-2.3
  • python-Django openSUSE Tumbleweed 4.2.11-2.1

opensuse advisories openSUSE-SU-2026:11270-1openSUSE-SU-2026:11248-1openSUSE-SU-2026:11235-1openSUSE-SU-2026:10005-1openSUSE-SU-2024:14208-1openSUSE-SU-2024:11205-1

  • py3-django Alpine 3.24, Alpine 3.23, Alpine 3.22 +9 more 3.1.13-r0

alpine advisories ALPINE-CVE-2021-35042

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • python-django Arch Linux 3.2.5-1

arch linux advisories AVG-2123

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-35042 updated cvss 9.8

django: potential SQL injection via unsanitized QuerySet.order_by() input

  • Red Hat Ansible Automation Platform 1.2 django, python-django Red Hat Ansible Tower 3 django Red Hat Ceph Storage 2 python-django, calamari-server, python-django-bash-completion Red Hat Ceph Storage 3 python-django, python-django-bash-completion Red Hat OpenStack Platform 10 (Newton) python-django, python-django-bash-completion Red Hat OpenStack Platform 13 (Queens) python-django, python2-django, python-django-bash-completion
    +5 more products
    Red Hat OpenStack Platform 16.1 python-django20, python3-django20, python-django20-bash-completion Red Hat OpenStack Platform 16.2 python-django20, python3-django20, python-django20-bash-completion Red Hat Satellite 6 python-django, python2-django, python3-django, python-django-bash-completion Red Hat Storage 3 python-django, python2-django, python-django-bash-completion Red Hat Update Infrastructure 3 for Cloud Providers python-django
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

44.37% chance of exploitation in the next 30 days, higher than 98% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
GitHub 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P
OSV 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
pypi django
>=3.2a1, <3.2.5
>=3.0a1, <3.1.13
>=3.1, <3.1.13
>=3.2, <3.2.5
3.2.5
3.1.13
bitnami django
>=3.1.0, <3.1.13
>=3.2.0, <3.2.5
3.1.13
3.2.5

Classification

Weakness
  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.