Skip to content
OpenAdvisories
Medium · 6.1 CVE-2020-25626 EUVD-2020-0073GHSA-fx83-3ph3-9j2qPYSEC-2020-263

Cross-site Scripting (XSS) in Django REST Framework

Published Sep 30, 2020 · Updated Aug 4, 2024 · Assigned by redhat

Description

A flaw was found in Django REST Framework versions before 3.12.0 and before 3.11.2. When using the browseable API viewer, Django REST Framework fails to properly escape certain strings that can come from user input. This allows a user who can control those strings to inject malicious <script> tags, leading to a cross-site-scripting (XSS) vulnerability.

Affected products

VendorProductAffectedFixed
— Django REST Framework All django-rest-framework versions before 3.12.0 and before 3.11.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 djangorestframework 3.12.1-1 —
Debian 13 djangorestframework 3.12.1-1 —
Debian 12 djangorestframework 3.12.1-1 —
Debian 10 djangorestframework 3.9.0-1+deb10u1 DSA-5186-1
ReleasePackageFixed inAdvisory
Ubuntu 26.10 djangorestframework No fix yet —
Ubuntu 26.04 LTS djangorestframework No fix yet —
Ubuntu 25.10 djangorestframework No fix yet —
Ubuntu 24.04 LTS djangorestframework No fix yet —
Ubuntu 22.04 LTS djangorestframework No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS djangorestframework No fix yet —
Ubuntu 18.04 LTS djangorestframework No fix yet —
Ubuntu 16.04 LTS djangorestframework No fix yet —
ReleasePackageFixed inAdvisory
SUSE Package Hub 15 SP2 python-djangorestframework +1 3.11.2-bp152.2.3.1 openSUSE-SU-2021:0338-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-djangorestframework 3.18.0-1.1 openSUSE-SU-2026:11571-1
openSUSE Leap 15.2 python-djangorestframework +1 3.11.2-lp152.2.3.1 openSUSE-SU-2021:0322-1

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI djangorestframework < 3.11.2 3.11.2 GHSA-fx83-3ph3-9j2q

Advisories 4

References