CVE-2021-32052
MEDIUM 6.1CVSS 3.1Header injection possible in Django
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.
- Published
- 6 May 2021
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-79CWE-88
- Also known as
- BIT-django-2021-32052GHSA-qm57-vhq3-3fwfPYSEC-2021-8
- Sources
- NVDJSONOSV GHSA-qm57-vhq3-3fwfJSONOSV PYSEC-2021-8JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | djangoproject | djangocpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* |
>= 2.2, < 2.2.22 | 2.2.22 |
| NVD | djangoproject | djangocpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* |
>= 3.1, < 3.1.10 | 3.1.10 |
| NVD | djangoproject | djangocpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* |
>= 3.2, < 3.2.2 | 3.2.2 |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* |
= 34 | |
| OSV | PyPI | django | >= 2.2, < 2.2.22 | 2.2.22 |
| OSV | PyPI | django | >= 3.1, < 3.1.10 | 3.1.10 |
| OSV | PyPI | django | >= 3.2, < 3.2.2 | 3.2.2 |
| OSV | 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 |
References
- http://www.openwall.com/lists/oss-security/2021/05/06/1 · Mailing List, Patch, Third Party Advisory, WEB
- https://docs.djangoproject.com/en/3.2/releases/security/ · Patch, Vendor Advisory, WEB
- https://groups.google.com/forum/#%21forum/django-announce
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/
- https://security.netapp.com/advisory/ntap-20210611-0002/ · Third Party Advisory, WEB
- https://www.djangoproject.com/weblog/2021/may/06/security-releases/ · Patch, Vendor Advisory, WEB, ARTICLE
- https://nvd.nist.gov/vuln/detail/CVE-2021-32052 · ADVISORY
- https://github.com/django/django/commit/e1e81aa1c4427411e3c68facdd761229ffea6f6f · WEB
- https://bugzilla.redhat.com/show_bug.cgi?id=1944801 · WEB
- https://github.com/advisories/GHSA-qm57-vhq3-3fwf · ADVISORY
- https://github.com/django/django · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-8.yaml · WEB
- https://groups.google.com/forum/#!forum/django-announce · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE · WEB
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 6 May 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 6 May 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 9 Jun 2021)