CVE-2021-32052

django: header injection possibility since URLValidator accepted newlines in input on Python 3.9.5+

Published May 6, 2021 CVSS 3.1 · 6.1 Medium EPSS 3.2% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2021-0065 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.
Github GHSA Github GHSA GHSA-qm57-vhq3-3fwf Header injection possible in Django
Ubuntu USN Ubuntu USN USN-4975-1 Django vulnerabilities
Ubuntu USN Ubuntu USN USN-5373-1 Django vulnerabilities
Ubuntu USN Ubuntu USN USN-5373-2 Django vulnerabilities
History

No history.

Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Aug 3, 2024, 11:17 PM
Reserved
May 5, 2021, 12:00 AM
Status
Modified
Published
May 6, 2021, 4:15 PM
Modified
Jun 17, 2026, 3:52 AM
Severity
Important
Public date
May 6, 2021, 12:00 AM