CVE-2024-21520 json
Cross-site Scripting in djangorestframework
published 2024-06-26 2 y ago modified 2026-07-07 4 mo ago also GHSA-gw84-84pc-xp82 , PYSEC-2026-1304 , EUVD-2024-2061
- cvss
- 6.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.1%
- EPSS 1.1% chance of exploitation in 30 days, percentile 66%
- public exploits
- 0
- none known
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 <br> tags.
Patch / fix
- pypi djangorestframework 3.15.2
- n/a djangorestframework 3.15.2
- django-rest-framework django_rest_framework 3.15.2
- djangorestframework Debian 14, Debian 13 3.15.2-1
debian advisories DEBIAN-CVE-2024-21520
- automation-controller-venv-tower ansible automation platform 2.4 4.5.12-1.el8ap
- automation-controller-venv-tower ansible automation platform 2.4 4.5.12-1.el9ap
red hat advisories RHSA-2024:7312
- python-djangorestframework openSUSE Tumbleweed 3.16.1-2.1
opensuse advisories openSUSE-SU-2026:10115-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-21520 updated cvss 6.1
djangorestframework: Cross-site Scripting (XSS) via break_long_headers
-
Red Hat Ansible Automation Platform 1.2 ansible-toweraffected: no fix planned “Will not fix”
-
Red Hat Ansible Automation Platform 2 aap-cloud-metrics-collector-container, ansible-automation-platform-25/lightspeed-rhel8 Red Hat Discovery 1 discovery-server-containeraffected: no fix available
-
Red Hat Ansible Automation Platform 2.4 for RHEL 8 automation-controller-venv-tower 4.5.12-1.el8ap Red Hat Ansible Automation Platform 2.4 for RHEL 9 automation-controller-venv-tower 4.5.12-1.el9apfixed: vendor fix RHSA-2024:7312
-
Red Hat Ansible Automation Platform 2 python-django-lifecycle, python3x-django-lifecycle, ansible-automation-platform-25/ee-minimal-rhel8, ansible-automation-platform-24/de-supported-rhel8, ansible-automation-platform-24/ee-supported-rhel9, ansible-automation-platform-25/ansible-builder-rhel8, +4 more Red Hat Ansible Automation Platform 2.4 for RHEL 8 automation-controller 4.5.12-1.el8ap, automation-controller-ui 4.5.12-1.el8ap, automation-controller-cli 4.5.12-1.el8ap, automation-controller-server 4.5.12-1.el8ap Red Hat Ansible Automation Platform 2.4 for RHEL 9 automation-controller 4.5.12-1.el9ap, automation-controller-ui 4.5.12-1.el9ap, automation-controller-cli 4.5.12-1.el9ap, automation-controller-server 4.5.12-1.el9apnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
1.13% chance of exploitation in the next 30 days, higher than 66% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 5.3 | 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 |
| CNA | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P |
| CNA | 4.0 | 2.1 | 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 |
| CNA | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | djangorestframework | <3.15.2 |
3.15.2 |
Affected products
- n/a djangorestframework
- django-rest-framework django_rest_framework
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/encode/django-rest-framework/pull/9435
web
-
github.com
/encode/django-rest-framework/commit/3b41f0124194430da957b119712978fa2266b642
web
-
security.snyk.io
/vuln/SNYK-PYTHON-DJANGORESTFRAMEWORK-7252137
web
-
github.com
/encode/django-rest-framework/compare/3.15.1...3.15.2
web
-
nvd.nist.gov
/vuln/detail/CVE-2024-21520
advisory
-
github.com
/encode/django-rest-framework
package
-
pypi.org
/project/djangorestframework
package
-
github.com
/advisories/GHSA-gw84-84pc-xp82
advisory
Sources
- CVE List CVE-2024-21520
- GitHub Advisory GHSA-gw84-84pc-xp82
- NVD CVE-2024-21520
- OSV PYSEC-2026-1304
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.