PyPI: djangorestframework
CVE-2024-21520
Safety vulnerability ID: SFTY-20240626-60446
Safety legacy ID: pyup.io-71849
Affected versions of the package djangorestframework 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.
Overview
Cross-site Scripting in djangorestframework
Advisory
Affected versions of the package djangorestframework 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.
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20240626-60446/CVE-2024-21520
- https://nvd.nist.gov/vuln/detail/CVE-2024-21520
- https://github.com/encode/django-rest-framework/pull/9435
- https://github.com/encode/django-rest-framework/commit/3b41f0124194430da957b119712978fa2266b642
- https://security.snyk.io/vuln/SNYK-PYTHON-DJANGORESTFRAMEWORK-7252137
- https://github.com/encode/django-rest-framework/compare/3.15.1...3.15.2
- https://github.com/advisories/GHSA-gw84-84pc-xp82
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
