Skip to main content
CVE-2024-21520VulnerabilityPublished Updated

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

0
Compare

Not known to be exploited · CVSS 6.1 Medium.

Data as of 24 Nov 2026, 21:14 UTC

CVSS 3.1 base score
6.1Medium
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 26 Jun 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: evidence found.

    Public exploit code: GitHub proofs of concept

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Ubuntu 24.04 LTSdjangorestframeworkpkg:deb/ubuntu/djangorestframework?arch=source&distro=nobleOther threatsAffected
  • =3.14.0-2
Fixed in–
Ubuntu 22.04 LTSdjangorestframeworkpkg:deb/ubuntu/djangorestframework?arch=source&distro=jammyOther threatsAffected
  • 3.12.1-1 – 3.12.4-2ubuntu1
5 affected builds
Fixed in–
Ubuntu 20.04 LTSdjangorestframeworkpkg:deb/ubuntu/djangorestframework?arch=source&distro=focalOther threatsAffected
  • =3.9.0-2
  • =3.10.2-1
Fixed in–
Ubuntu 18.04 LTSdjangorestframeworkpkg:deb/ubuntu/djangorestframework?arch=source&distro=bionicOther threatsAffected
  • =3.4.0-2
  • =3.7.7-1
Fixed in–
Ubuntu 16.04 LTSdjangorestframeworkpkg:deb/ubuntu/djangorestframework?arch=source&distro=xenialOther threatsAffected
  • 2.4.3-2 – 3.3.2-2
4 affected builds
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

Community reviews

Loading reviews…