CVE-2024-21520
LOW 2.1CVSS 4.0Cross-site Scripting in djangorestframework
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.
- Published
- 26 Jun 2024
- Last modified
- 7 Jul 2026
- Assigned by
- report@snyk.io
- NVD status
- Deferred
- Weakness
- CWE-79
- Also known as
- GHSA-gw84-84pc-xp82PYSEC-2026-1304
- Sources
- NVDJSONOSV GHSA-gw84-84pc-xp82JSONOSV PYSEC-2026-1304JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | report@snyk.io (Secondary) | CVSS 4.0 | LOW 2.1 | 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 |
| OSV | GitHub | CVSS 4.0 | 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 | |
| OSV | PyPA | CVSS 4.0 | 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 | |
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | PyPA | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | PyPI | djangorestframework | < 3.15.2 | 3.15.2 |
References
- https://github.com/encode/django-rest-framework/commit/3b41f0124194430da957b119712978fa2266b642 · WEB
- https://github.com/encode/django-rest-framework/pull/9435 · WEB
- https://security.snyk.io/vuln/SNYK-PYTHON-DJANGORESTFRAMEWORK-7252137 · WEB
- https://github.com/encode/django-rest-framework/compare/3.15.1...3.15.2 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-21520 · ADVISORY
- https://github.com/encode/django-rest-framework · PACKAGE
- https://pypi.org/project/djangorestframework · PACKAGE
- https://github.com/advisories/GHSA-gw84-84pc-xp82 · ADVISORY
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 26 Jun 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 26 Jun 2024)