CVE-2024-21520
MEDIUM6.1EPSS 8.4%Cross-site Scripting in djangorestframework
Published: 6/26/2024Modified: 4/28/2026
Description
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.
Affected packages (2)
- Debian/djangorestframeworkfrom 0
- PyPI/djangorestframeworkfrom 0, < 3.15.2
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | 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 | CVSS 3.1 | MEDIUM6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
References (7)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2024-21520
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2024-21520
- PATCHhttps://github.com/encode/django-rest-framework
- WEBhttps://github.com/encode/django-rest-framework/commit/3b41f0124194430da957b119712978fa2266b642
- WEBhttps://github.com/encode/django-rest-framework/compare/3.15.1...3.15.2
- WEBhttps://github.com/encode/django-rest-framework/pull/9435
- WEBhttps://security.snyk.io/vuln/SNYK-PYTHON-DJANGORESTFRAMEWORK-7252137