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
Affects djangorestframeworkSource GCVE Database
Not known to be exploited · CVSS 6.1 Medium.
Data as of 24 Nov 2026, 21:14 UTC
- EPSS
- 1.1% chance of exploitation in 30 days – higher than 67% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 26 Jun 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: evidence found.
Public exploit code: GitHub proofs of concept
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), GitHub proofs of concept, the Metasploit, Exploit-DB and nuclei-templates index as of 24 Nov 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 24.04 LTSdjangorestframeworkpkg:deb/ubuntu/djangorestframework?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 22.04 LTSdjangorestframeworkpkg:deb/ubuntu/djangorestframework?arch=source&distro=jammyOther threats | Affected
| Fixed in– |
Ubuntu 20.04 LTSdjangorestframeworkpkg:deb/ubuntu/djangorestframework?arch=source&distro=focalOther threats | Affected
| Fixed in– |
Ubuntu 18.04 LTSdjangorestframeworkpkg:deb/ubuntu/djangorestframework?arch=source&distro=bionicOther threats | Affected
| Fixed in– |
Ubuntu 16.04 LTSdjangorestframeworkpkg:deb/ubuntu/djangorestframework?arch=source&distro=xenialOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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.
References
- ubuntu.com/security/CVE-2024-21520 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2024-21520 (opens in a new tab)
- github.com/encode/django-rest-framework/pull/9435 (opens in a new tab)
- github.com/encode/django-rest-framework/commit/3b41f0124194430da957b119712978fa2266b642 (opens in a new tab)
- security.snyk.io/vuln/SNYK-PYTHON-DJANGORESTFRAMEWORK-7252137 (opens in a new tab)