MEDIUM 6.1
PYSEC-2026-804
Django REST framework XSS Vulnerability
Details
Django REST framework (aka django-rest-framework) before 3.9.1 allows XSS because the default DRF Browsable API view templates disable autoescaping.
Are you affected?
Enter the version of the package you're using.
Affected packages
PyPI / django-rest-framework
Introduced in:
0 Fixed in: 3.9.1 Fix
pip install --upgrade 'django-rest-framework>=3.9.1' References
- https://nvd.nist.gov/vuln/detail/CVE-2018-25045 [ADVISORY]
- https://github.com/encode/django-rest-framework/pull/6191 [WEB]
- https://github.com/encode/django-rest-framework/pull/6330 [WEB]
- https://github.com/encode/django-rest-framework/commit/4bb9a3c48427867ef1e46f7dee945a4c25a4f9b8 [WEB]
- https://github.com/encode/django-rest-framework [PACKAGE]
- https://pypi.org/project/django-rest-framework [PACKAGE]
- https://github.com/advisories/GHSA-xqcf-hj92-967m [ADVISORY]