Advisory

PYSEC-2026-1304

Also known as: CVE-2024-21520, GHSA-gw84-84pc-xp82

Summary

Cross-site Scripting in djangorestframework

Details

Versions of the package djangorestframework before 3.15.2 are vulnerable to Cross-site Scripting (XSS) via the break_long_headers template filter due to improper input sanitization before splitting and joining with <br> tags.

Severity

Medium Basis: CVSS v3 score 6.1, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Dates

Published
2026-07-07 14:34 UTC
Modified
2026-07-07 17:46 UTC

Affected packages and fixes

djangorestframework

PyPI · All systems

Affected

  • introduced 0, fixed 3.15.2 (ecosystem)

Fixed versions

3.15.2

Fix

  • Fixed version 3.15.2
    pip install --upgrade djangorestframework==3.15.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: PyPA Advisory Database · CC BY 4.0

Sources & licences