encode/django-rest-framework · Security
Cross-site Scripting (XSS) in Django REST Framework
- GHSA ID
- GHSA-fx83-3ph3-9j2q
- CVE ID
- CVE-2020-25626
- Severity
- medium
- Published
- Updated
- CVSS
- 6.1 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CVSS v3
- 6.1 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CVSS v4
- 5.3 · CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
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 tags, leading to a cross-site-scripting (XSS) vulnerability.
CWEs
- CWE-20 · Improper Input Validation
- CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References
- https://nvd.nist.gov/vuln/detail/CVE-2020-25626 ↗
- https://bugzilla.redhat.com/show_bug.cgi?id=1878635 ↗
- https://www.debian.org/security/2022/dsa-5186 ↗
- https://github.com/advisories/GHSA-fx83-3ph3-9j2q ↗
- https://github.com/pypa/advisory-database/tree/main/vulns/djangorestframework/PYSEC-2020-263.yaml ↗
- https://security.netapp.com/advisory/ntap-20201016-0003 ↗