Bug 1957455 (CVE-2021-32052) - CVE-2021-32052 django: header injection possibility since URLValidator accepted newlines in input on Python 3.9.5+
Summary: CVE-2021-32052 django: header injection possibility since URLValidator accept...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2021-32052
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1957664 1958207 1958208 1957661 1957662 1957663 1957710 1958377 1958412 1958413 1958414
Blocks: 1957456
TreeView+ depends on / blocked
 
Reported: 2021-05-05 19:21 UTC by Guilherme de Almeida Suckevicz
Modified: 2021-12-14 18:47 UTC (History)
57 users (show)

Fixed In Version: django 3.2.2, django 3.1.10, django 2.2.22
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in django. On Python 3.9.5+, `URLValidator` didn't prohibited newlines and tabs which could lead to a header injection attack if these were used in an HTTP response. The highest threat from this vulnerability is to data confidentiality and integrity.
Clone Of:
Environment:
Last Closed: 2021-10-28 02:01:27 UTC


Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2021-05-05 19:21:40 UTC
A flaw was found in Django. On Python 3.9.5+, ``URLValidator`` didn't prohibited newlines and tabs. If you used values with newlines in HTTP response, you could suffer from header injection attacks. Django itself wasn't vulnerable because ``HttpResponse`` prohibit newlines in HTTP headers.

Comment 2 Summer Long 2021-05-06 03:43:24 UTC
Upstream pull: https://github.com/django/django/pull/14349

Comment 4 msiddiqu 2021-05-06 10:42:48 UTC
External References:

https://www.djangoproject.com/weblog/2021/may/06/security-releases/

Comment 5 msiddiqu 2021-05-06 10:44:14 UTC
Created python-django tracking bugs for this issue:

Affects: fedora-all [bug 1957710]

Comment 7 Summer Long 2021-05-06 23:25:28 UTC
Mitigation:

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Comment 8 Guilherme de Almeida Suckevicz 2021-05-07 12:48:14 UTC
Created python-django tracking bugs for this issue:

Affects: epel-all [bug 1958207]
Affects: openstack-rdo [bug 1958208]

Comment 11 Tapas Jena 2021-05-07 18:48:44 UTC
The current python version in case of Ansible Engine is 3.6.8 which is not vulnerable to the concerned vulnerability and the current python-django version in case of AAP 1.2 is 2.2.17 which is Affected. Since, Django itself is not vulnerable, marking AAP 1 with Python-Django as affected and Tower and AAP with only Django as "Not affected".

Comment 13 amctagga 2021-05-07 20:45:58 UTC
Statement:

* Red Hat Gluster Storage 3 ships an old version of Django (v1.11.27) that provides support for Python 3.7, hence not affected by this vulnerability.
* Red Hat Satellite and Red Hat Update Infrastructure ships affected versions of Django, however, products make use of Python 2.7 and Python 3.6 consumed from RHEL repository. Successful exploitation would require Support to Python version 3.9.5 onward hence products are not affected by this vulnerability.
* Red Hat Ceph Storage (RHCS) 2 and 3 ship an affected version of Django.


Note You need to log in before you can comment on or make changes to this bug.