5.1medium
Potential cross-site scripting via URLField values in the admin
- Severity
- 5.1medium CVSS:4.0 by DSF
- Exploit likelihood
- 0.47% (higher than 42% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- DSF
- Also known as
- BIT-DJANGO-2026-15920
Description
An issue was discovered in Django 5.2 before 5.2.17 and 6.0 before 6.0.8. `django.contrib.admin.utils.display_for_field()` renders `URLField` values as clickable links in the admin without validating the URL. A value stored with an unsafe scheme is displayed as a link on changelist and read-only admin pages, which allows cross-site scripting against staff users who click the link. Exploitation requires the unsafe value to already be stored in the database. `URLField` validation through a `ModelForm` or the admin rejects unsafe schemes, so this affects applications that persist `URLField` data without running model validation, for example through direct queryset writes, deserialization, or bulk import of untrusted input. Django would like to thank Egor Saltykov for reporting this issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| django | from 6.0 before 6.0.8, from 5.2 before 5.2.17 Not affected: 6.0.8, 5.2.17 | CVE List |
| djangoproject django | from 5.2 before 5.2.17, from 6.0 before 6.0.8 | NVD |
| django (Bitnami) | from 5.2.0 before 5.2.17, from 6.0.0 before 6.0.8 | Bitnami Vulnerability Database |
All scores
| DSF | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| DSF | 5.1medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N |
| Bitnami Vulnerability Database | medium rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
An issue was discovered in Django 5.2 before 5.2.17 and 6.0 before 6.0.8. `django.contrib.admin.utils.display_for_field()` renders `URLField` values as clickable links in the admin without validating the URL. A value stored with an unsafe scheme is displayed as a link on changelist and read-only admin pages, which allows cross-site scripting against staff users who click the link. Exploitation requires the unsafe value to already be stored in the database. `URLField` validation through a `ModelForm` or the admin rejects unsafe schemes, so this affects applications that persist `URLField` data without running model validation, for example through direct queryset writes, deserialization, or bulk import of untrusted input. Django would like to thank Egor Saltykov for reporting this issue.
NVD (es)
Se descubrió un problema en Django 5.2 anterior a 5.2.17 y 6.0 anterior a 6.0.8. ’django.contrib.admin.utils.display_for_field()’ renderiza los valores de ’URLField’ como enlaces clicables en el administrador sin validar la URL. Un valor almacenado con un esquema inseguro se muestra como un enlace en las páginas de lista de cambios y de administración de solo lectura, lo que permite cross-site scripting contra los usuarios del personal que hacen clic en el enlace. La explotación requiere que el valor inseguro ya esté almacenado en la base de datos. La validación de ’URLField’ a través de un ’ModelForm’ o el administrador rechaza los esquemas inseguros, por lo que esto afecta a las aplicaciones que persisten datos de ’URLField’ sin ejecutar la validación del modelo, por ejemplo, mediante escrituras directas de queryset, deserialización o importación masiva de entrada no confiable. Django desea agradecer a Egor Saltykov por informar de este problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-15920 changed 2026-08-04 | CVE Terms of Use |
| NVD | CVE-2026-15920 changed 2026-10-24 | Public domain |
| Bitnami Vulnerability Database | BIT-DJANGO-2026-15920 changed 2026-09-08 | Apache-2.0 |