Live threats

All CVEs / django-rest-framework

CVE-2024-21520django-rest-framework django_rest_framework

Low 2.1 No auth needed

Priority
28
CVSS 4.0
2.1
EPSS
1.6%
probability of exploitation in 30 days · percentile 76
Auth required
No
Published
Jun 26, 2024
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-79
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: partial
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for django_rest_framework.
  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 djangorestframework < 3.15.2 3.15.2 pip install "djangorestframework>=3.15.2"
PyPI djangorestframework < 3.15.2 3.15.2 pip install "djangorestframework>=3.15.2"

Per OSV / GitHub Advisories (GHSA-gw84-84pc-xp82, PYSEC-2026-1304). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official advisories

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

Official sources

References

Links published by the sources. Open them with care.