{"id":"CVE-2024-21520","published":"2024-06-26T05:00:02Z","modified":"2024-12-31T10:10:34Z","title":"Versions of the package djangorestframework before 3.15.2 are vulnerable to Cross-site Scripting (XSS) via the…","vendor":null,"product":null,"tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01607,"percentile":0.76252,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-PYTHON-DJANGORESTFRAMEWORK-7252137","tags":[]},{"url":"https://github.com/encode/django-rest-framework/pull/9435","tags":[]},{"url":"https://github.com/encode/django-rest-framework/commit/3b41f0124194430da957b119712978fa2266b642","tags":[]},{"url":"https://github.com/encode/django-rest-framework/compare/3.15.1...3.15.2","tags":["x_transferred"]}],"priority":{"score":24.5,"factors":[{"name":"EPSS percentile","points":15.25},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":4.27}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2024-05-26","earliestUrl":"https://github.com/ch4n3-yoon/CVE-2024-21520-Demo","repos":[{"name":"ch4n3-yoon/CVE-2024-21520-Demo","url":"https://github.com/ch4n3-yoon/CVE-2024-21520-Demo","stars":0,"created":"2024-05-26"}]},"first":{"date":"2024-05-26","source":"PoC-in-GitHub","url":"https://github.com/ch4n3-yoon/CVE-2024-21520-Demo"},"provenance":"source"},"affectedVersions":[{"vendor":"n/a","product":"djangorestframework","versions":["< 3.15.2"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-06-26T13:25:31.230970Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"djangorestframework","vulnerableRanges":["<3.15.2"],"patched":["3.15.2"],"from":["GHSA-gw84-84pc-xp82","PYSEC-2026-1304"],"provenance":"source"}],"summary":{"text":"The flaw is a cross-site scripting (XSS) weakness in the break_long_headers template filter of the djangorestframework package, affecting versions before 3.15.2, where input is not properly sanitized before being split and joined with <br> tags. An attacker can inject script into pages that use the filter by getting a user to interact with crafted content (user interaction required), with no authentication needed and reachable over the network.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:47:49Z"},"euvd":{"id":"EUVD-2024-2061","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-django-rest-framework-cve-2018-25045","parents":[{"from":"CVE-2018-25045","to":"CVE-2024-21520","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["rest_framework/templatetags/rest_framework.py"],"commits":["https://github.com/encode/django-rest-framework/commit/4bb9a3c48427867ef1e46f7dee945a4c25a4f9b8","https://github.com/encode/django-rest-framework/commit/3b41f0124194430da957b119712978fa2266b642"],"basis":"rarely changed file"}]}]}}