GitHub Advisoryadvisory · PyPI

GHSA-qm57-vhq3-3fwf Header injection possible in Django

MEDIUM Published 2021-06-09 Modified 2024-09-20 Official page ↗
Aliases
CVE-2021-32052
Ecosystem
PyPI
Packages
Django
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weaknesses
CWE-79, CWE-88
Reviewed
2021-05-19

Affected packages

• PyPI Django: >= 2.2, < 2.2.22 → fixed in 2.2.22 • PyPI Django: >= 3.1, < 3.1.10 → fixed in 3.1.10 • PyPI Django: >= 3.2, < 3.2.2 → fixed in 3.2.2

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.

Related

Alias · CVE (1)

  • CVE-2021-32052 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… vulnerability

Weakness · CWE (2)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness
  • CWE-88 Improper Neutralization of Argument Delimiters in a Command weakness

References