# CVE-2024-21520: PYSEC-2026-1304 - Cross-site Scripting in djangorestframework

Source: https://junglewise.ai/threats/cve-2024-21520-cross-site-scripting-in-djangorestframework  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-07  
License: CC BY 4.0 with a link back

CVE-2024-21520 · Severity: low · CVSS 3.1 · Published 2026-07-07

Cross-site Scripting in djangorestframework

Technologies: [djangorestframework (PyPI)](https://junglewise.ai/threats/technologies/djangorestframework). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2024-21520 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-21520 being exploited in the wild.

**How severe is CVE-2024-21520?** Low severity, with a CVSS score of 3.1, published 7 July 2026.

**Which products and versions are affected?** djangorestframework (PyPI) ECOSYSTEM:introduced=0,fixed=3.15.2.

**Is there a fix for CVE-2024-21520?** Yes. djangorestframework (PyPI): upgrade to 3.15.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2024-21520?** Check whether you run djangorestframework (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- djangorestframework (PyPI): upgrade to 3.15.2 or later

  ```sh
  pip install "djangorestframework>=3.15.2"
  ```


## Affected products

- djangorestframework (PyPI) ECOSYSTEM:introduced=0,fixed=3.15.2

## Identifiers

- CVE-2024-21520
- GHSA-gw84-84pc-xp82
- PYSEC-2026-1304

## Related threats

- [Django REST framework ReDoS in content negotiation](https://junglewise.ai/threats/cve-2026-114138-django-rest-framework-is-a-toolkit-for-building-web-apis-prior)
- [Django REST framework token deletion bypass](https://junglewise.ai/threats/cve-2026-114137-django-rest-framework-is-a-toolkit-for-building-web-apis-from-3)
- [Django REST framework memory amplification via charset codec](https://junglewise.ai/threats/cve-2026-114136-django-rest-framework-is-a-toolkit-for-building-web-apis-from-3)
- [Django REST framework AdminRenderer permission bypass information disclosure](https://junglewise.ai/threats/cve-2026-73229-django-rest-framework-adminrenderer-permission-bypass-information)
- [Django REST Framework DATA_UPLOAD_MAX_MEMORY_SIZE bypass in request.data](https://junglewise.ai/threats/cve-2026-73228-django-rest-framework-data-upload-max-memory-size-bypass-in)
