Medium severity6.1OSV Advisory· Published Jun 26, 2024· Updated Apr 29, 2026
CVE-2024-21520
CVE-2024-21520
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 tags.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
djangorestframeworkPyPI | < 3.15.2 | 3.15.2 |
Affected products
3- Range: 0.1, 0.2.4, 0.3.1, …
- ghsa-coords2 versionspkg:pypi/djangorestframeworkpkg:rpm/opensuse/python-djangorestframework&distro=openSUSE%20Tumbleweed
< 3.15.2+ 1 more
- (no CPE)range: < 3.15.2
- (no CPE)range: < 3.16.1-2.1
Patches
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- github.com/advisories/GHSA-gw84-84pc-xp82ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-21520ghsaADVISORY
- github.com/encode/django-rest-framework/commit/3b41f0124194430da957b119712978fa2266b642nvdWEB
- github.com/encode/django-rest-framework/compare/3.15.1...3.15.2nvdWEB
- github.com/encode/django-rest-framework/pull/9435nvdWEB
- security.snyk.io/vuln/SNYK-PYTHON-DJANGORESTFRAMEWORK-7252137nvdWEB
News mentions
0No linked articles in our index yet.