Bug 2102896 (CVE-2022-34265)

Summary: CVE-2022-34265 python-django: Potential SQL injection via Trunc(kind) and Extract(lookup_name) arguments
Product: [Other] Security Response Reporter: Todd Cullum <tcullum>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: ahanwate, amctagga, aoconnor, apevec, bbuckingham, bcoca, bcourt, bkearney, bniver, btotty, chousekn, cmeyers, davidn, eglynn, ehelms, flucifre, gblomqui, gmeno, jal233, jcammara, jhardy, jjoyce, jobarker, jsherril, jwong, kaycoth, kshier, lhh, lzap, mabashia, martin.schlossarek, mbenjamin, mburns, mhackett, mhulan, michel, mkushwah, mrunge, myarboro, nmoumoul, notting, orabin, osapryki, pcreech, rchan, rdopiera, relrod, rhos-maint, rpalathi, rpetrell, sdoran, security-response-team, sgallagh, slavek.kabrda, smcdonal, sostapov, spower, tkuratom, vereddy
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-django 4.0.6, python-django 3.2.14 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Django. The Trunc() and Extract() database functions are subject to SQL injection if untrusted data is used as a kind/lookup_name value.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-30 15:55:54 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: 2104869, 2104870, 2104871, 2104872, 2105184, 2105185, 2105186, 2105187, 2105188, 2105189, 2105190, 2105191, 2105192, 2105193, 2105194, 2105195, 2105196, 2105197, 2105198, 2105199, 2105207, 2105209, 2105210, 2105212, 2105214, 2105215, 2105216, 2109822    
Bug Blocks: 2102892    

Description Todd Cullum 2022-06-30 23:30:14 UTC
In Django versions 4.0, 4.1 (beta), and 3.2, `Trunc()` and `Extract()` database functions were subject to SQL
injection if untrusted data was used as a `lookup_name`/`kind` value. Applications that constrain the lookup name and kind choice to a known safe
list are unaffected.

Comment 9 Avinash Hanwate 2022-07-08 09:12:40 UTC
Created python-django tracking bugs for this issue:

Affects: epel-7 [bug 2105207]
Affects: epel-8 [bug 2105210]
Affects: fedora-35 [bug 2105214]
Affects: fedora-36 [bug 2105215]
Affects: openstack-rdo [bug 2105216]


Created python-django16 tracking bugs for this issue:

Affects: epel-7 [bug 2105209]


Created python-django3 tracking bugs for this issue:

Affects: epel-8 [bug 2105212]

Comment 14 errata-xmlrpc 2022-07-27 14:47:28 UTC
This issue has been addressed in the following products:

  RHUI 4 for RHEL 8

Via RHSA-2022:5738 https://access.redhat.com/errata/RHSA-2022:5738

Comment 15 Product Security DevOps Team 2022-08-30 15:55:50 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-34265

Comment 16 errata-xmlrpc 2022-11-16 13:32:20 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.12 for RHEL 8

Via RHSA-2022:8506 https://access.redhat.com/errata/RHSA-2022:8506