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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | 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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | djangorestframework | No fix yet | — |
| Ubuntu 18.04 LTS | djangorestframework | No fix yet | — |
| Ubuntu 16.04 LTS | djangorestframework | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE Package Hub 15 SP2 | python-djangorestframework +1 | 3.11.2-bp152.2.3.1 | openSUSE-SU-2021:0338-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | djangorestframework | < 3.11.2 | 3.11.2 | GHSA-fx83-3ph3-9j2q |
Advisories 4
- openSUSE-SU-2026:11571-1 python313-djangorestframework-3.18.0-1.1 on GA media SUSE / openSUSE Security Updates · Aug 22, 2026
- DSA-5186-1 djangorestframework - security update Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2021:0322-1 Security update for python-djangorestframework SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2021:0338-1 Security update for python-djangorestframework SUSE / openSUSE Security Updates · Feb 4, 2026