Advisory

GHSA-qm57-vhq3-3fwf

Also known as: BIT-django-2021-32052, CVE-2021-32052, PYSEC-2021-8

Summary

Header injection possible in Django

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2021-06-09 17:14 UTC
Modified
2024-09-20 15:33 UTC

Affected packages and fixes

django

PyPI · All systems

Affected

  • introduced 2.2, fixed 2.2.22 (ecosystem)

Fixed versions

2.2.22

Fix

  • Fixed version 2.2.22
    pip install --upgrade django==2.2.22

django

PyPI · All systems

Affected

  • introduced 3.1, fixed 3.1.10 (ecosystem)

Fixed versions

3.1.10

Fix

  • Fixed version 3.1.10
    pip install --upgrade django==3.1.10

django

PyPI · All systems

Affected

  • introduced 3.2, fixed 3.2.2 (ecosystem)

Fixed versions

3.2.2

Fix

  • Fixed version 3.2.2
    pip install --upgrade django==3.2.2

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences