CVE-2021-32052
Django vulnerability analysis and mitigation

Overview

CVE-2021-32052 affects Django versions 2.2 before 2.2.22, 3.1 before 3.1.10, and 3.2 before 3.2.2 when used with Python 3.9.5+. The vulnerability was discovered and disclosed on May 6, 2021, and involves the URLValidator component not properly prohibiting newlines and tabs in input validation (Django Security).

Technical details

The vulnerability exists in Django's URLValidator component which failed to prohibit newlines and tabs in input validation when running on Python 3.9.5 or higher. This issue was introduced by the bpo-43882 fix. The vulnerability has been assigned a CVSS score of 6.1 (MEDIUM) with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N (NetApp Advisory).

Impact

If an application uses values with newlines in HTTP responses, it could be vulnerable to header injection attacks. However, Django's core functionality remains unaffected as HttpResponse prohibits newlines in HTTP headers. Additionally, the URLField form field silently removes newlines and tabs on Python 3.9.5+, limiting the vulnerability to cases where the validator is used outside of form fields (Django Security).

Mitigation and workarounds

The issue has been fixed in Django versions 3.2.2, 3.1.10, and 2.2.22. Users are encouraged to upgrade to these patched versions as soon as possible. The fixes have been applied to Django's main branch and the respective release branches (Django Security).

Additional resources


SourceThis report was generated using AI

Related Django vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-64459CRITICAL9.1
  • DjangoDjango
  • python311-Django
NoYesNov 05, 2025
CVE-2025-64460HIGH7.5
  • DjangoDjango
  • python-django
NoYesDec 02, 2025
CVE-2025-64458HIGH7.5
  • DjangoDjango
  • py3-django
NoYesNov 05, 2025
CVE-2025-59682MEDIUM6.5
  • DjangoDjango
  • py3-django
NoYesOct 01, 2025
CVE-2025-13372MEDIUM4.3
  • DjangoDjango
  • python-django
NoYesDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management