Vulnerability · Published Jun 26, 2024 · Assigned by snyk

CVE-2024-21520

Medium 6.1

In plain English

A medium-severity cross-site scripting in djangorestframework. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.1% (higher than 67% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.1Medium
Exploit odds (30 days)1.1%top 33.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling1Public PoC

Official 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 & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12djangorestframeworkno fix listedDEBIAN-CVE-2024-21520
Debian:13djangorestframework3.15.2-1DEBIAN-CVE-2024-21520
Debian:14djangorestframework3.15.2-1DEBIAN-CVE-2024-21520
PyPIdjangorestframework3.15.2PYSEC-2026-1304
PyPIdjangorestframework3.15.2GHSA-gw84-84pc-xp82
Ubuntu:22.04:LTSdjangorestframeworkno fix listedUBUNTU-CVE-2024-21520
Ubuntu:24.04:LTSdjangorestframeworkno fix listedUBUNTU-CVE-2024-21520

Affected products (as reported)

VendorProductVersions
n/a djangorestframework 0 – before 3.15.2

Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P

References