Live threats

All CVEs / Djangoproject

CVE-2021-35042Djangoproject Django

Critical 9.8 No auth neededHigh EPSS

Priority
78
CVSS 3.1
9.8
EPSS
44.4%
probability of exploitation in 30 days · percentile 99
Auth required
No
Published
Jul 2, 2021
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-89
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Django.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI django ≥ 3.2a1 < 3.2.5 3.2.5 pip install "django>=3.2.5"
PyPI django ≥ 3.0a1 < 3.1.13 3.1.13 pip install "django>=3.1.13"
PyPI django ≥ 3.1 < 3.1.13 3.1.13 pip install "django>=3.1.13"
PyPI django ≥ 3.2 < 3.2.5 3.2.5 pip install "django>=3.2.5"

Per OSV / GitHub Advisories (GHSA-xpfp-f569-q3p2, PYSEC-2021-109). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
djangoprojectdjango≥ 3.1 < 3.1.13
djangoprojectdjango≥ 3.2 < 3.2.5
fedoraprojectfedora34

Official advisories

Also: SUSE (+1)

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.