CVE-2024-21520
Published: 26 June 2024
Summary
CVE-2024-21520 is a low-severity Cross-site Scripting (CWE-79) vulnerability in Snyk (inferred from references). Its CVSS base score is 2.1 (Low).
Operationally, ranked in the top 7.5% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.
Deeper analysis
Versions of the djangorestframework package before 3.15.2 contain a cross-site scripting vulnerability in the break_long_headers template filter. The issue stems from insufficient input sanitization prior to splitting header values and rejoining them with <br> tags, allowing attacker-controlled content to be rendered as HTML.
An unauthenticated remote attacker can supply malicious input that reaches the affected filter. Successful exploitation results in script execution in a victim's browser, with limited impact on confidentiality, integrity, and availability as reflected in the CVSS 2.1 rating that requires user interaction.
The referenced GitHub commits and package comparison show that the maintainers addressed the flaw by releasing version 3.15.2; the Snyk advisory likewise recommends upgrading to that version to eliminate the unsanitized code path.
EPSS for the CVE rose from lower values to a peak of 0.1627 on 2025-12-11 before receding to the current 0.0840, indicating measurable post-disclosure exploitation interest that warrants renewed attention.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2024-2061
Vulnerability 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.
- CWE(s)
Related Threats
No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.
Affected Assets
Mitigating Controls
Likely Mitigating Controls AI
Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.
Penetration testing submits XSS payloads to web applications, detecting cross-site scripting flaws for subsequent remediation.
Validates web inputs to reject script-related content that could produce XSS.
Output validation against expected content can reject or sanitize script content in generated web pages, reducing XSS exploitability.