# CVE-2021-32052: Header injection possible in Django

- Severity: Medium 6.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.71%, higher than 86% of CVEs (2026-12-01)
- Published: 2021-05-06T15:49:20.000Z
- Modified: 2026-09-08T08:46:25.519Z
- Also known as: GHSA-qm57-vhq3-3fwf, BIT-DJANGO-2021-32052, PYSEC-2021-8
- Weaknesses: CWE-79, CWE-88
- Assigned by: mitre

## Description

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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- django (PyPI): from 2.2 before 2.2.22; from 3.1 before 3.1.10; from 3.2 before 3.2.2
- djangoproject django: from 2.2 before 2.2.22; from 3.1 before 3.1.10; from 3.2 before 3.2.2
- fedoraproject fedora: 34
- django (Bitnami): from 2.2.0 before 2.2.22; from 3.1.0 before 3.1.10; from 3.2.0 before 3.2.2

## Every score

- GitHub: 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`
- GitHub: CVSS:4.0 Medium `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: 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`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://groups.google.com/forum/#%21forum/django-announce> (web)
- <https://docs.djangoproject.com/en/3.2/releases/security/> (advisory, patch, vendor-advisory, web)
- <http://www.openwall.com/lists/oss-security/2021/05/06/1> (advisory, mailing-list, patch, third-party-advisory, web)
- <https://www.djangoproject.com/weblog/2021/may/06/security-releases/> (advisory, article, patch, vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/> (vendor-advisory, web)
- <https://security.netapp.com/advisory/ntap-20210611-0002/> (advisory, third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-32052> (advisory, web)
- <https://github.com/django/django/commit/e1e81aa1c4427411e3c68facdd761229ffea6f6f> (web)
- <https://bugzilla.redhat.com/show_bug.cgi?id=1944801> (web)
- <https://docs.djangoproject.com/en/3.2/releases/security> (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)
- <https://security.netapp.com/advisory/ntap-20210611-0002> (web)
- <https://www.djangoproject.com/weblog/2021/may/06/security-releases> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/> (web)

## Sources

- CVE List: [CVE-2021-32052](https://www.cve.org/CVERecord?id=CVE-2021-32052), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-qm57-vhq3-3fwf](https://github.com/advisories/GHSA-qm57-vhq3-3fwf), CC-BY-4.0, modified 2024-09-20
- NVD: [CVE-2021-32052](https://nvd.nist.gov/vuln/detail/CVE-2021-32052), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-8](https://osv.dev/vulnerability/PYSEC-2021-8), CC-BY-4.0, modified 2023-12-06
- Bitnami Vulnerability Database: [BIT-DJANGO-2021-32052](https://osv.dev/vulnerability/BIT-DJANGO-2021-32052), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-32052 · Whole record: https://cve.day/CVE-2021-32052.json · Rebuilt by cve.day 2026-11-25T22:58:01.183Z
