Skip to main content
EPSS 0.4%top 67%

CVE-2026-15920: CWE-83: Improper Neutralization of Script in Attributes in a Web Page in djangoproject Django

0
Medium
Published: 08/18/2026 (08/18/2026, 10:04:42 UTC)
Source: CVE Database V5
Vendor/Project: djangoproject
Product: 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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected software

djangoproject

Django

Affected versions
>=6.0 <6.0.8>=5.2 <5.2.17
django
pkg:pypi/django
Affected versions
>=6.0 <6.0.8>=5.2 <5.2.17

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/11/2026, 18:13:49 UTC

Technical Analysis

This vulnerability in Django's admin interface involves improper neutralization of script in URLField attributes. The function django.contrib.admin.utils.display_for_field() renders URLField values as clickable links without validating the URL scheme, allowing stored unsafe schemes to execute cross-site scripting attacks on staff users. The vulnerability affects Django versions 5.2 prior to 5.2.17 and 6.0 prior to 6.0.8. Exploitation requires unsafe URL values to be present in the database, which can happen if data bypasses model validation, for example through direct queryset writes or deserialization of untrusted input. The vulnerability is identified as CWE-83 and has a CVSS 3.1 score of 6.1 (medium severity).

Potential Impact

Successful exploitation can lead to cross-site scripting attacks against staff users of the Django admin interface, potentially allowing attackers to execute arbitrary scripts in the context of the admin user's browser session. This can result in information disclosure or session hijacking. However, exploitation requires that unsafe URL values are already stored in the database, which is prevented by standard model validation in forms and the admin interface. Therefore, the impact is limited to applications that persist URLField data without validation.

Mitigation Recommendations

A fix is available in Django versions 5.2.17 and 6.0.8 and later. Users should upgrade to these or newer versions to remediate this vulnerability. Until upgraded, ensure that URLField data is always validated through model validation before being saved to the database to prevent unsafe URL schemes from being stored. Avoid direct database writes or bulk imports of untrusted URLField data without validation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
DSF
Date Reserved
2026-07-15T20:32:49.882Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6a72133ebf8831d5391ad463

Added to database: 08/04/2026, 16:28:46 UTC

Last enriched: 08/11/2026, 18:13:49 UTC

Last updated: 09/19/2026, 10:01:30 UTC

Views: 54

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses