Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. Django
  4. ›
  5. CVE-2021-32052

CVE-2021-32052: Header injection possible in Django

June 9, 2021 (updated September 20, 2024)

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.

References

  • bugzilla.redhat.com/show_bug.cgi?id=1944801
  • docs.djangoproject.com/en/3.2/releases/security
  • github.com/advisories/GHSA-qm57-vhq3-3fwf
  • github.com/django/django
  • github.com/django/django/commit/e1e81aa1c4427411e3c68facdd761229ffea6f6f
  • github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-8.yaml
  • groups.google.com/forum/
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE
  • nvd.nist.gov/vuln/detail/CVE-2021-32052
  • security.netapp.com/advisory/ntap-20210611-0002
  • www.djangoproject.com/weblog/2021/may/06/security-releases

Code Behaviors & Features

Detect and mitigate CVE-2021-32052 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.2 before 2.2.22, all versions starting from 3.1 before 3.1.10, all versions starting from 3.2 before 3.2.2

Fixed versions

  • 2.2.22
  • 3.1.10
  • 3.2.2

Solution

Upgrade to versions 2.2.22, 3.1.10, 3.2.2 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
  • CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

Source file

pypi/Django/CVE-2021-32052.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 12 May 2025 12:14:24 +0000.