Skip to content
Fencer Vulns
medium 6.1

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-django
    affected: 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-completion
    affected: 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-completion
    +2 more products
    Red Hat Storage 3 python-django, python2-django, python-django-bash-completion Red Hat Update Infrastructure 3 for Cloud Providers python-django
    not 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.”

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
  • CWE-79 Improper Neutralization of Input During Web Page Generation
  • CWE-88 Improper Neutralization of Argument Delimiters in a Command
Technology feeds

References

Sources

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.