{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-21520","id":"CVE-2024-21520","title":"Cross-site Scripting in djangorestframework","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.","descriptionLong":"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","updated":"2026-10-28T02:30:50.914632091Z","reserved":"2023-12-22T12:33:20.120Z","status":"Deferred","rejected":false,"assigner":"snyk","metric":{"version":"4.0","score":5.3,"vector":"CVSS: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","rating":"medium","source":"snyk"},"metrics":[{"version":"4.0","score":5.3,"vector":"CVSS: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","rating":"medium","source":"snyk"},{"version":"4.0","score":2.1,"vector":"CVSS: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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","rating":"low","source":"snyk.io"},{"version":"4.0","score":null,"vector":"CVSS: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","rating":"unrated","source":"OSV"},{"version":"4.0","score":null,"vector":"CVSS: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","rating":"medium","source":"GitHub"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P","rating":"medium","source":"snyk"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"snyk.io"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"OSV"}],"rating":"medium","products":["djangorestframework"],"affectedProducts":[{"vendor":"n/a","product":"djangorestframework","defaultStatus":null,"versions":[{"version":"0","lessThan":"3.15.2","status":"affected","versionType":"semver"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"djangorestframework","purl":"pkg:pypi/djangorestframework","ranges":["<3.15.2"],"fixed":["3.15.2"],"advisory":"GHSA-gw84-84pc-xp82"}],"cwes":["CWE-79"],"aliases":["GHSA-gw84-84pc-xp82","PYSEC-2026-1304"],"references":[{"url":"https://security.snyk.io/vuln/SNYK-PYTHON-DJANGORESTFRAMEWORK-7252137","tags":["x_transferred","web"]},{"url":"https://github.com/encode/django-rest-framework/pull/9435","tags":["x_transferred","fix","web"]},{"url":"https://github.com/encode/django-rest-framework/commit/3b41f0124194430da957b119712978fa2266b642","tags":["x_transferred","fix","web"]},{"url":"https://github.com/encode/django-rest-framework/compare/3.15.1...3.15.2","tags":["x_transferred","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21520.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21520","tags":["advisory"]},{"url":"https://github.com/encode/django-rest-framework","tags":["package"]},{"url":"https://pypi.org/project/djangorestframework","tags":["package"]},{"url":"https://github.com/advisories/GHSA-gw84-84pc-xp82","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.01133,"epssPercentile":0.67144,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-21520","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21520","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-21520","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-gw84-84pc-xp82","ok":true,"note":"GHSA-gw84-84pc-xp82"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-21520","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}