Low
Security advisory
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 tags.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-21520
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 12:23 UTC · Revision 1
Source evidence
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 tags.
osv:CVE-2024-21520
Complete source record
{
"id": "6abcdc9c54671140c717e34ba48fe4d8428eea51c762b53fb5a24b4bd0126307",
"url": "https://osv.dev/vulnerability/CVE-2024-21520",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2024-21520",
"summary": "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 tags.",
"evidence": "osv:CVE-2024-21520",
"products": [],
"severity": "low",
"structured": {
"id": "CVE-2024-21520",
"aliases": [
"CVE-2024-21520",
"GHSA-gw84-84pc-xp82",
"PYSEC-2026-1304"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "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"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/encode/django-rest-framework",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "c7a7eae551528b6887614df816c8a26df70272d6"
},
{
"fixed": "3b41f0124194430da957b119712978fa2266b642"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "3.15.2"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
},
{
"range": [
{
"fixed": "3b41f0124194430da957b119712978fa2266b642"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"3.15.1",
"3.15.0",
"3.14.0",
"3.13.1",
"3.13.0",
"3.12.4",
"3.12.3",
"3.12.1",
"3.12.0",
"3.11.0",
"3.10.3",
"3.10.2",
"3.10.1",
"3.10.0",
"3.9.3",
"3.9.2",
"3.9.1",
"3.8.2",
"3.8.1",
"3.8.0",
"3.7.7",
"3.7.6",
"3.7.5",
"3.7.4",
"3.7.3",
"3.7.2",
"3.7.1",
"3.7.0",
"3.6.4",
"3.6.3",
"3.6.2",
"3.6.1",
"3.6.0",
"3.5.4",
"3.5.3",
"3.5.2",
"3.5.1",
"3.5.0",
"3.4.7",
"3.4.6",
"3.4.5",
"3.4.4",
"3.4.3",
"3.4.2",
"3.4.1",
"3.4.0",
"3.3.2",
"3.3.1",
"3.2.4",
"3.2.3",
"3.2.2",
"3.2.1",
"3.2.0",
"3.1.3",
"3.1.2",
"3.1.1",
"3.1.0",
"3.0.5",
"3.0.3",
"3.0.4",
"3.0.2",
"3.0.1",
"3.0.0",
"2.4.4",
"2.4.3",
"2.4.2",
"2.4.1",
"2.4.0",
"2.3.14",
"2.3.13",
"2.3.12",
"2.3.11",
"2.3.10",
"2.3.9",
"2.3.8",
"2.3.7",
"2.3.6",
"2.3.5",
"2.3.4",
"2.3.3",
"2.3.2",
"2.3.1",
"2.3.0",
"2.2.7",
"2.2.6",
"2.2.4",
"2.2.3",
"2.2.2",
"2.2.1",
"2.2.0",
"2.1.17",
"2.1.16",
"2.1.15",
"2.1.14",
"2.1.13",
"2.1.12",
"2.1.11",
"2.1.10",
"2.1.9",
"2.1.8",
"2.1.7",
"2.1.6",
"2.1.5",
"2.1.4",
"2.1.3",
"2.1.2",
"2.1.1",
"2.1.0",
"2.0.2",
"2.0.1",
"2.0.0",
"0.4.0",
"0.3.3",
"0.3.2",
"0.3.1",
"0.2.4",
"0.1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-21520.json"
}
}
],
"modified": "2026-10-28T02:30:50.914632091Z",
"provider": "osv",
"references": [
"https://github.com/encode/django-rest-framework/compare/3.15.1...3.15.2",
"https://security.snyk.io/vuln/SNYK-PYTHON-DJANGORESTFRAMEWORK-7252137",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21520.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-21520",
"https://github.com/encode/django-rest-framework/commit/3b41f0124194430da957b119712978fa2266b642",
"https://github.com/encode/django-rest-framework/pull/9435"
],
"provider_metadata": {
"cwe_ids": [
"CWE-79"
],
"cna_assigner": "snyk",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21520.json"
}
},
"related_cves": [
{
"value": "CVE-2024-21520",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 519273,
"published_at": "2024-06-26T05:00:02.49+00:00"
}