CVE-2021-32052 json
Header injection possible in Django
published 2021-05-06 5 y ago modified 2026-09-08 2 mo ago also BIT-django-2021-32052 , EUVD-2021-0065 , GHSA-qm57-vhq3-3fwf , PYSEC-2021-8
- cvss
- 6.1
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 3.2%
- EPSS 3.2% chance of exploitation in 30 days, percentile 88%
- public exploits
- 0
- none known
Summary
In Django 2.2 before 2.2.22, 3.1 before 3.1.10, and 3.2 before 3.2.2 (with Python 3.9.5+), URLValidator does not prohibit newlines and tabs (unless the URLField form field is used). If an application uses values with newlines in an HTTP response, header injection can occur. Django itself is unaffected because HttpResponse prohibits newlines in HTTP headers.
Patch / fix
- pypi django 2.2.22, 3.1.10, 3.2.2
- bitnami django 2.2.22, 3.1.10, 3.2.2
- djangoproject django 2.2.22, 3.1.10, 3.2.2
- python-django Debian 14, Debian 13, Debian 12 2:2.2.22-1
debian advisories DEBIAN-CVE-2021-32052
- python-django Ubuntu 18.04 LTS 1:1.11.11-1ubuntu1.17
- python-django Ubuntu 20.04 LTS 2:2.2.12-1ubuntu0.7
ubuntu advisories UBUNTU-CVE-2021-32052
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-Django5 openSUSE Tumbleweed 5.2.16-1.1
- python-Django openSUSE Tumbleweed 5.2.16-1.1
- python-Django4 openSUSE Tumbleweed 4.2.30-4.1
- python-Django6 openSUSE Tumbleweed 6.0-1.1
- python-Django4 openSUSE Tumbleweed 4.2.14-1.1
- python-Django openSUSE Tumbleweed 3.2.7-2.3
- python-Django openSUSE Tumbleweed 4.2.11-2.1
- python-Django Package Hub 15 SP3, openSUSE Leap 15.3 2.2.28-bp153.2.3.1
opensuse advisories openSUSE-SU-2026:11270-1openSUSE-SU-2026:11248-1openSUSE-SU-2026:11235-1openSUSE-SU-2026:10005-1openSUSE-SU-2024:14208-1openSUSE-SU-2024:11205-1
- python-django Arch Linux 3.2.2-1
arch linux advisories AVG-1924
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-32052 updated cvss 7.4
django: header injection possibility since URLValidator accepted newlines in input on Python 3.9.5+
-
Red Hat Ansible Automation Platform 1.2 python-djangoaffected: workaround, no fix available “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update as soon as possible.”
-
Red Hat Ceph Storage 2 python-django, calamari-server, python-django-bash-completion Red Hat Ceph Storage 3 python-django, python-django-bash-completionaffected: workaround, no fix planned “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update as soon as possible.”
-
Red Hat Ansible Automation Platform 1.2 django Red Hat Ansible Tower 3 django Red Hat OpenStack Platform 10 (Newton) python-django, python-django-bash-completion Red Hat OpenStack Platform 13 (Queens) python-django, python2-django, python-django-bash-completion Red Hat OpenStack Platform 16.1 python-django20, python3-django20, python-django20-bash-completion Red Hat Satellite 6 python-django, python2-django, python3-django, python-django-bash-completionnot affected: vulnerable code not present “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update as soon as possible.”
+2 more productsfewer
Red Hat Storage 3 python-django, python2-django, python-django-bash-completion Red Hat Update Infrastructure 3 for Cloud Providers python-django
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
3.17% chance of exploitation in the next 30 days, higher than 88% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| GitHub | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
| OSV | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | django | >=2.2, <2.2.22 >=3.1, <3.1.10 >=3.2, <3.2.2 |
2.2.22 3.1.10 3.2.2 |
| bitnami | django | >=2.2.0, <2.2.22 >=3.1.0, <3.1.10 >=3.2.0, <3.2.2 |
2.2.22 3.1.10 3.2.2 |
Classification
- Weakness
- Technology feeds
References
-
docs.djangoproject.com
/en/3.2/releases/security/
patch, vendor-advisory, advisory, web
-
openwall.com
/lists/oss-security/2021/05/06/1
web, mailing-list, patch, third-party-advisory, advisory
-
djangoproject.com
/weblog/2021/may/06/security-releases/
patch, vendor-advisory, advisory, article
-
github.com
/django/django/commit/e1e81aa1c4427411e3c68facdd761229ffea6f6f
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/
vendor-advisory, web
-
groups.google.com
/forum/#%21forum/django-announce
web
-
security.netapp.com
/advisory/ntap-20210611-0002/
third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-32052
advisory, web
-
bugzilla.redhat.com
/show_bug.cgi?id=1944801
web
-
docs.djangoproject.com
/en/3.2/releases/security
web
-
github.com
/advisories/GHSA-qm57-vhq3-3fwf
advisory
-
github.com
/django/django
package
-
github.com
/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-8.yaml
web
-
groups.google.com
/forum/#!forum/django-announce
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE
web
-
security.netapp.com
/advisory/ntap-20210611-0002
web
-
djangoproject.com
/weblog/2021/may/06/security-releases
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/
web
Sources
- CVE List CVE-2021-32052
- GitHub Advisory GHSA-qm57-vhq3-3fwf
- NVD CVE-2021-32052
- OSV BIT-django-2021-32052
- OSV PYSEC-2021-8
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.