In Django 2.2 before 2.2.22, 3.1 before 3.1.10, and 3.2 before 3.2.2 (with Python…
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting, Code execution
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Partial Red Hat: 3 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-79 and CWE-88.
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | Django (PyPI) | 2.2 to before 2.2.22 | 2.2.22 | Patch available | GHSA-qm57-vhq3-3fwf |
| — | Django (PyPI) | 3.1 to before 3.1.10 | 3.1.10 | Patch available | GHSA-qm57-vhq3-3fwf |
| — | Django (PyPI) | 3.2 to before 3.2.2 | 3.2.2 | Patch available | GHSA-qm57-vhq3-3fwf |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- Django (PyPI) Vendor— Affected 2.2 to before 2.2.22 Fixed in 2.2.22 Patch available GHSA-qm57-vhq3-3fwf
- Django (PyPI) Vendor— Affected 3.1 to before 3.1.10 Fixed in 3.1.10 Patch available GHSA-qm57-vhq3-3fwf
- Django (PyPI) Vendor— Affected 3.2 to before 3.2.2 Fixed in 3.2.2 Patch available GHSA-qm57-vhq3-3fwf
CPE configurations NVD · 3
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* | 2.2 to before 2.2.22; 3.1 to before 3.1.10; 3.2 to before 3.2.2 | Vulnerable | djangoproject |
| cpe:2.3:a:python:python:*:*:*:*:*:*:*:* | 3.9.5 | Running on | python-pillow |
| cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* | 34 | Vulnerable | Fedoraproject |
- cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* Versions 2.2 to before 2.2.22; 3.1 to before 3.1.10; 3.2 to before 3.2.2 Vulnerable ·djangoproject
- cpe:2.3:a:python:python:*:*:*:*:*:*:*:* Versions 3.9.5 Running on ·python-pillow
- cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* Versions 34 Vulnerable ·Fedoraproject
Remediation
- Fix · GHSA-qm57-vhq3-3fwf Django (PyPI) Fixed in 2.2.22 Advisory →
- Fix · GHSA-qm57-vhq3-3fwf Django (PyPI) Fixed in 3.1.10 Advisory →
- Fix · GHSA-qm57-vhq3-3fwf Django (PyPI) Fixed in 3.2.2 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Ansible Automation Platform 1.2 | Affected | No fix yet |
| Red Hat Ceph Storage 2 | Affected | No fix planned: Will not fix |
| Red Hat Ceph Storage 3 | Affected | No fix planned: Will not fix |
Not affected: 8 products
- Red Hat Ansible Automation Platform 1.2
- Red Hat Ansible Tower 3
- Red Hat OpenStack Platform 10 (Newton)
- Red Hat OpenStack Platform 13 (Queens)
- Red Hat OpenStack Platform 16.1
- Red Hat Satellite 6
- Red Hat Storage 3
- Red Hat Update Infrastructure 3 for Cloud Providers
Timeline
- 2026-10-02 Threatist record created from CVE-2021-32052
- 2026-10-03 Alias added: GHSA-qm57-vhq3-3fwf
References
Patch 3
Advisory 4
Other 10
- https://groups.google.com/forum/#%21forum/django-announce
- https://github.com/django/django/commit/e1e81aa1c4427411e3c68facdd761229ffea6f6f
- https://bugzilla.redhat.com/show_bug.cgi?id=1944801
- https://docs.djangoproject.com/en/3.2/releases/security
- https://github.com/django/django
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-8.yaml
- https://groups.google.com/forum/#!forum/django-announce
- https://lists.fedoraproject.org/archives/list/[email protected]/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE
- https://security.netapp.com/advisory/ntap-20210611-0002
- https://www.djangoproject.com/weblog/2021/may/06/security-releases
Sources
- CVE-2021-32052 · CVE Program
- CVE-2021-32052 · NVD
- FIRST EPSS
- GHSA-qm57-vhq3-3fwf · GitHub Advisory Database · CC BY 4.0
- CVE-2021-32052 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences