CVE-2026-15920: CWE-83: Improper Neutralization of Script in Attributes in a Web Page in djangoproject Django
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.
AI Analysis
Technical Summary
CVE-2026-15920 is an XSS vulnerability in Django's admin interface affecting versions 5.2 prior to 5.2.17 and 6.0 prior to 6.0.8. The function django.contrib.admin.utils.display_for_field() renders URLField values as clickable links without validating the URL scheme, allowing unsafe schemes to be rendered and exploited for cross-site scripting against staff users. Exploitation requires that unsafe URL values are already stored in the database, which can occur if model validation is bypassed, for example via direct queryset writes or deserialization of untrusted input. The vulnerability is tracked under CWE-83 (Improper Neutralization of Script in Attributes).
Potential Impact
This vulnerability enables cross-site scripting attacks against staff users of the Django admin interface if they click on maliciously crafted URLField links containing unsafe URL schemes stored in the database. The impact is limited to scenarios where unsafe URL data is persisted without validation, potentially leading to information disclosure or session hijacking through XSS. The CVSS score of 6.1 reflects a medium severity with network attack vector, low attack complexity, no privileges required, user interaction needed, and partial confidentiality and integrity impact.
Mitigation Recommendations
A fix is available in Django versions 5.2.17 and later and 6.0.8 and later. Users should upgrade to these or later versions to remediate the vulnerability. Until upgraded, ensure that URLField data is validated before being stored in the database to prevent unsafe URL schemes. Avoid persisting URLField data through direct database writes, deserialization, or bulk imports without validation. No additional vendor advisory content was provided, so check the official Django release notes for detailed patch information.
CVE-2026-15920: CWE-83: Improper Neutralization of Script in Attributes in a Web Page in djangoproject Django
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.
CVSS v3.1
Score 6.1medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-15920 is an XSS vulnerability in Django's admin interface affecting versions 5.2 prior to 5.2.17 and 6.0 prior to 6.0.8. The function django.contrib.admin.utils.display_for_field() renders URLField values as clickable links without validating the URL scheme, allowing unsafe schemes to be rendered and exploited for cross-site scripting against staff users. Exploitation requires that unsafe URL values are already stored in the database, which can occur if model validation is bypassed, for example via direct queryset writes or deserialization of untrusted input. The vulnerability is tracked under CWE-83 (Improper Neutralization of Script in Attributes).
Potential Impact
This vulnerability enables cross-site scripting attacks against staff users of the Django admin interface if they click on maliciously crafted URLField links containing unsafe URL schemes stored in the database. The impact is limited to scenarios where unsafe URL data is persisted without validation, potentially leading to information disclosure or session hijacking through XSS. The CVSS score of 6.1 reflects a medium severity with network attack vector, low attack complexity, no privileges required, user interaction needed, and partial confidentiality and integrity impact.
Mitigation Recommendations
A fix is available in Django versions 5.2.17 and later and 6.0.8 and later. Users should upgrade to these or later versions to remediate the vulnerability. Until upgraded, ensure that URLField data is validated before being stored in the database to prevent unsafe URL schemes. Avoid persisting URLField data through direct database writes, deserialization, or bulk imports without validation. No additional vendor advisory content was provided, so check the official Django release notes for detailed patch information.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- DSF
- Date Reserved
- 2026-07-15T20:32:49.882Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a72133ebf8831d5391ad463
Added to database: 08/04/2026, 16:28:46 UTC
Last enriched: 08/04/2026, 16:46:32 UTC
Last updated: 08/04/2026, 21:03:13 UTC
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.