Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. Django
  4. ›
  5. CVE-2021-35042

CVE-2021-35042: SQL Injection in Django

September 22, 2021 (updated September 20, 2024)

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.

References

  • docs.djangoproject.com/en/3.2/releases/security
  • github.com/advisories/GHSA-xpfp-f569-q3p2
  • github.com/django/django
  • github.com/django/django/commit/0bd57a879a0d54920bb9038a732645fb917040e9
  • github.com/django/django/commit/a34a5f724c5d5adb2109374ba3989ebb7b11f81f
  • github.com/django/django/commit/dae83a24519d6f284c74414e0b81d64d9b5a0db4
  • github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-109.yaml
  • groups.google.com/forum/
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SS6NJTBYWOX6J7G4U3LUOILARJKWPQ5Y
  • nvd.nist.gov/vuln/detail/CVE-2021-35042
  • security.netapp.com/advisory/ntap-20210805-0008
  • www.djangoproject.com/weblog/2021/jul/01/security-releases
  • www.openwall.com/lists/oss-security/2021/07/02/2

Code Behaviors & Features

Detect and mitigate CVE-2021-35042 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 3.2a1 before 3.2.5, all versions starting from 3.0a1 before 3.1.13

Fixed versions

  • 3.2.5
  • 3.1.13

Solution

Upgrade to versions 3.1.13, 3.2.5 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Source file

pypi/Django/CVE-2021-35042.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:07 +0000.