All CVEs / django-rest-framework
CVE-2024-21520django-rest-framework django_rest_framework
Low 2.1 No auth needed
Follow: this CVE · django-rest-framework · django-rest-framework django_rest_framework We alert you by email or Slack (account required).
- 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.
What to do
- Apply the vendor's security update for django_rest_framework.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How 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
- django-rest-framework · django_rest_framework
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official advisories
- python311-djangorestframework-3.16.1-2.1 on GA media · SUSE · openSUSE-SU-2026:10115-1 · Jan 29, 2026 Low
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.