CVE-2024-21520
JSON

5.3medium

Cross-site Scripting in djangorestframework

Severity
5.3medium CVSS:4.0 by snyk
Exploit likelihood
1.13% (higher than 67% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-gw84-84pc-xp82PYSEC-2026-1304

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

Product or packageVersionsReported by
djangorestframeworkbefore 3.15.2CVE List
django-rest-framework django_rest_frameworkbefore 3.15.2CVE List
djangorestframework (PyPI)before 3.15.2GitHub Advisory Database, PyPA Advisory Database

All scores

snyk5.3medium CVSS:4.0CVSS: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
snyk6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P
GitHub6.1low CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHublow CVSS:4.0CVSS: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
PyPA Advisory Database6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS: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

Classification

CWE-79

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Las versiones del paquete djangorestframework anteriores a la 3.15.2 son vulnerables a Cross-site Scripting (XSS) a través del filtro de plantilla break_long_headers debido a una sanitización inadecuada de la entrada antes de dividir y unir con etiquetas <br>.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-21520 changed 2024-12-31CVE Terms of Use
GitHub Advisory DatabaseGHSA-gw84-84pc-xp82 changed 2026-07-07CC-BY-4.0
NVDCVE-2024-21520 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-1304 changed 2026-07-07CC-BY-4.0