VDB
Sign up
MEDIUM6.1

PYSEC-2026-804

Django REST framework XSS Vulnerability

Quick fix

PYSEC-2026-804 — django-rest-framework: upgrade to the fixed version with the command below.

pip install --upgrade 'django-rest-framework>=3.9.1'

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: 0Fixed in: 3.9.1
Fixpip install --upgrade 'django-rest-framework>=3.9.1'

References