Live threats

All CVEs / Djangoproject

CVE-2021-32052Djangoproject Django

Medium 6.1 No auth needed

Priority
52
CVSS 3.1
6.1
EPSS
2.7%
probability of exploitation in 30 days · percentile 87
Auth required
No
Published
May 6, 2021
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-79
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Django.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI django ≥ 2.2 < 2.2.22 2.2.22 pip install "django>=2.2.22"
PyPI django ≥ 3.1 < 3.1.10 3.1.10 pip install "django>=3.1.10"
PyPI django ≥ 3.2 < 3.2.2 3.2.2 pip install "django>=3.2.2"
PyPI django ≥ 2.2 < 2.2.22 2.2.22 pip install "django>=2.2.22"
PyPI django ≥ 3.1 < 3.1.10 3.1.10 pip install "django>=3.1.10"
PyPI django ≥ 3.2 < 3.2.2 3.2.2 pip install "django>=3.2.2"

Per OSV / GitHub Advisories (GHSA-qm57-vhq3-3fwf, PYSEC-2021-8). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
djangoprojectdjango≥ 2.2 < 2.2.22
djangoprojectdjango≥ 3.1 < 3.1.10
djangoprojectdjango≥ 3.2 < 3.2.2
fedoraprojectfedora34

Official advisories

Also: SUSE (+1)

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.