HTTP Header Injection Affecting django package, versions [3.2,3.2.2)[3.0,3.1.10)[,2.2.22)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.17% (55th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-DJANGO-1290072
  • published6 May 2021
  • disclosed6 May 2021
  • creditUnknown

Introduced: 6 May 2021

CVE-2021-32052  (opens in a new tab)
CWE-644  (opens in a new tab)

How to fix?

Upgrade Django to version 3.2.2, 3.1.10, 2.2.22 or higher.

Overview

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

Affected versions of this package are vulnerable to HTTP Header Injection. In Python 3.9.5+ urllib.parse() automatically removes ASCII newlines and tabs from URLs. Unfortunately it created an issue in the URLValidator. URLValidator uses urllib.urlsplit() and urllib.urlunsplit() for creating a URL variant with Punycode which no longer contains newlines and tabs in Python 3.9.5+. As a consequence, the regular expression matched the URL (without unsafe characters) and the source value (with unsafe characters) was considered valid.

This issue was introduced by the bpo-43882 fix.

CVSS Scores

version 3.1