Bug 1975918 (CVE-2021-35042)

Summary: CVE-2021-35042 django: potential SQL injection via unsanitized QuerySet.order_by() input
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: amctagga, anharris, apevec, bbuckingham, bcoca, bcourt, bkearney, bniver, btotty, caswilli, chousekn, cmeyers, davidn, dbecker, ehelms, flucifre, gblomqui, gmeno, hvyas, jal233, jcammara, jhardy, jjoyce, jobarker, jschluet, jsherril, kaycoth, lhh, lpeer, lzap, mabashia, mbenjamin, mburns, mhackett, mhroncok, mhulan, michel, mmccune, mrunge, myarboro, nmoumoul, notting, orabin, osapryki, pcreech, puebele, rchan, rdopiera, relrod, rjerrido, rpetrell, sclewis, sdoran, security-response-team, sgallagh, slavek.kabrda, slinaber, slong, smcdonal, sokeeffe, sostapov, tkuratom, vereddy
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: django 3.2.5, django 3.1.13 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in django. Unsanitized user input passed to ``QuerySet.order_by()`` could bypass intended column reference validation in path marked for deprecation resulting in a potential SQL injection even if a deprecation warning is emitted. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-20 18:17:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1976793, 1978288    
Bug Blocks: 1975920    

Description Guilherme de Almeida Suckevicz 2021-06-24 17:58:29 UTC
Unsanitized user input passed to ``QuerySet.order_by()`` could bypass intended column reference validation in path marked for deprecation resulting in a potential SQL injection even if a deprecation warning is emitted.

Comment 4 Tapas Jena 2021-06-30 07:06:18 UTC
Analysis is complete for Ansible and it is found that None of the Ansible components do use the Affected version of DJango i.e. 3.x at this point of time. Hence, marking its as "Not Affected" for Ansible.

Comment 7 Mark Cooper 2021-07-01 13:20:24 UTC
Created python-django tracking bugs for this issue:

Affects: fedora-all [bug 1978288]