{"id":"CVE-2024-21520","aliases":["GHSA-gw84-84pc-xp82","PYSEC-2026-1304"],"url":"https://o3.security/vulnerability/CVE-2024-21520","summary":"Cross-site Scripting in djangorestframework","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.","published":"2024-06-26T05:00:02.490Z","modified":"2026-08-12T03:51:18.899300048Z","cvss":null,"epss":{"score":0.01133,"percentile":0.64887,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"djangorestframework","fixedVersion":"3.15.2"}],"fix":{"url":"https://github.com/encode/django-rest-framework/commit/3b41f0124194430da957b119712978fa2266b642","label":"encode/django-rest-framework@3b41f01"},"references":[{"type":"WEB","url":"https://github.com/encode/django-rest-framework/compare/3.15.1...3.15.2"},{"type":"WEB","url":"https://security.snyk.io/vuln/SNYK-PYTHON-DJANGORESTFRAMEWORK-7252137"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21520.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21520"},{"type":"FIX","url":"https://github.com/encode/django-rest-framework/commit/3b41f0124194430da957b119712978fa2266b642"},{"type":"FIX","url":"https://github.com/encode/django-rest-framework/pull/9435"},{"type":"PACKAGE","url":"https://github.com/encode/django-rest-framework"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:18.899300048Z"}}