GHSA-xpfp-f569-q3p2
CRITICAL
SQL Injection in Django
Published September 22, 2021Updated February 21, 2025Source: osv
Details
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.
Remediation
Upgrade to the fixed version using your package manager.
pip
Update django to 3.1.13 or laterpip install "django>=3.1.13"
pip
Update django to 3.2.5 or laterpip install "django>=3.2.5"
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (2)
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-89SQL InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 3.1 score means for each attack dimension.
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
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
Risk Assessment
CVSS Score
3.1
Exploitation is difficult or impact is minor. Address in your next planned update.
EPSS Score (30-day exploit probability)
89.86%
Higher than 100% of vulnerabilities
Also Known As
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies