PyPA Advisory Database
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.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| PyPI | django-rest-framework | All versions before 3.9.1 (fixed in 3.9.1) |
References
- https://nvd.nist.gov/vuln/detail/CVE-2018-25045
- https://github.com/encode/django-rest-framework/pull/6191
- https://github.com/encode/django-rest-framework/pull/6330
- https://github.com/encode/django-rest-framework/commit/4bb9a3c48427867ef1e46f7dee945a4c25a4f9b8
- https://github.com/encode/django-rest-framework
- https://pypi.org/project/django-rest-framework
- https://github.com/advisories/GHSA-xqcf-hj92-967m