cve.bz

CVE-2021-32052 Cross-site Scripting

6.1 mediumEPSS 3.2%Fix available

Medium (6.1). EPSS 3.2% estimated probability of exploitation activity in the next 30 days. Fixed in django 2.2.22, 3.1.10, 3.2.2.

On this page
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.

Severity

CVSS 3.1

6.1 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
3.2% (unchanged from 3.2% a week ago; 3.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 88th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-79 Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-32052 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-32052?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-32052?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-32052 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
djangoproject:djangofrom 2.2 before 2.2.22
djangoproject:djangofrom 3.1 before 3.1.10
djangoproject:djangofrom 3.2 before 3.2.2
fedoraproject:fedora34

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-qm57-vhq3-3fwfPyPIdjango>=2.2 <2.2.222.2.22
GHSA-qm57-vhq3-3fwfPyPIdjango>=3.1 <3.1.103.1.10
GHSA-qm57-vhq3-3fwfPyPIdjango>=3.2 <3.2.23.2.2
PYSEC-2021-8PyPIdjango>=2.2 <2.2.22
>=3.1 <3.1.10
>=3.2 <3.2.2
2.2.22, 3.1.10, 3.2.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14python-django2:2.2.22-1DEBIAN-CVE-2021-32052
Ubuntu18.04:LTSpython-django1:1.11.11-1ubuntu1.17UBUNTU-CVE-2021-32052 USN-4975-1 USN-5373-1
Ubuntu20.04:LTSpython-django2:2.2.12-1ubuntu0.7UBUNTU-CVE-2021-32052 USN-4975-1 USN-5373-1
UbuntuPro:14.04:LTSpython-django1.6.11-0ubuntu1.3+esm5USN-5373-2
UbuntuPro:16.04:LTSpython-django1.8.7-1ubuntu5.15+esm5USN-5373-2
SUSEPackage Hub 15 SP3python-Django2.2.28-bp153.2.3.1openSUSE-SU-2023:0005-1
openSUSELeap 15.3python-Django2.2.28-bp153.2.3.1openSUSE-SU-2023:0005-1
openSUSETumbleweedpython-Django3.2.7-2.3openSUSE-SU-2024:11205-1
openSUSETumbleweedpython-Django4.2.11-2.1openSUSE-SU-2024:13887-1
openSUSETumbleweedpython-Django5.2.16-1.1openSUSE-SU-2026:11248-1
openSUSETumbleweedpython-Django44.2.14-1.1openSUSE-SU-2024:14208-1
openSUSETumbleweedpython-Django44.2.30-4.1openSUSE-SU-2026:11235-1
openSUSETumbleweedpython-Django55.2.16-1.1openSUSE-SU-2026:11270-1
openSUSETumbleweedpython-Django66.0-1.1openSUSE-SU-2026:10005-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's 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.

Red Hat's mitigation

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.

ProductPackageStateAdvisory
Red Hat Ansible Automation Platform 1.2djangoNot affected
Red Hat Ansible Automation Platform 1.2python-djangoAffected
Red Hat Ansible Tower 3djangoNot affected
Red Hat Ceph Storage 2calamari-serverWill not fix
Red Hat Ceph Storage 2python-djangoWill not fix
Red Hat Ceph Storage 3python-djangoWill not fix
Red Hat OpenStack Platform 10 (Newton)python-djangoNot affected
Red Hat OpenStack Platform 13 (Queens)python-djangoNot affected
Red Hat OpenStack Platform 16.1python-django20Not affected
Red Hat Satellite 6python3-djangoNot affected
Red Hat Satellite 6python-djangoNot affected
Red Hat Storage 3python-djangoNot affected
Red Hat Update Infrastructure 3 for Cloud Providerspython-djangoNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-32052.

Attack patterns (CAPEC)

  • CAPEC-63 Cross-Site Scripting (XSS) Likelihood: High · Severity: Very High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-209 XSS Using MIME Type Mismatch Severity: Medium
  • CAPEC-588 DOM-Based XSS Likelihood: High · Severity: Very High
  • CAPEC-591 Reflected XSS Likelihood: High · Severity: Very High
  • CAPEC-592 Stored XSS Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON