Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker submits javascript: URL into user-controllable field
-
DeliveryApp renders value via djust component into href/action
-
ExploitMalicious link stored/reflected to victim
-
ExecutionVictim clicks link in authenticated session
-
ImpactScript executes, steals session/cookies
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires a developer/application to render a user-controllable URL through one of the affected djust built-in component template tags (breadcrumb, dj_nav link/dropdown/brand, citation URL, cookie-consent privacy link, error-page action, or form action) - the vulnerability does not manifest in default djust unless these components are used with untrusted URL input. For href/action sinks the reflected variant additionally requires the victim to click the malicious link; the stored variant (URL persisted from one user and shown to another) removes the injector-side interaction but still needs the victim to render/click. img src sinks are explicitly noted as non-executing and thus not exploitable. Limiting factors: conditional developer usage of these components with untrusted data, victim click for href execution, and the fix being available in djust 1.0.7 (workaround: pre-validate URL schemes before binding to component arguments). |
| Impact | No CVSS vector is provided by NVD or the vendor (input CVSS is N/A), so numeric severity cannot be reconciled against signals - the maintainer self-rates this Medium in the GHSA. This is a classic javascript:-URI DOM/href XSS (CWE-79): HTML escaping via conditional_escape stops attribute breakout but not scheme-based script execution. Real-world risk is moderate and heavily conditioned: the flaw only becomes exploitable when a developer feeds user-controllable URL data into one of the affected djust component tags (breadcrumb, dj_nav, citation, cookie-consent, error-page action, form action), so it is a library-provided sink rather than a turnkey remote hole. No EPSS score, no CISA KEV listing, and no public POC (the reproducer/writeup is retained privately by the maintainer), which argues against widespread opportunistic exploitation. Because authentication requirements cannot be confirmed from a CVSS vector (none supplied), risk should be treated as 'remote attackers who can influence a rendered URL value,' with the worst case being a stored variant persisted by one user and rendered to another. Priority is real but bounded: patch when convenient and audit component usage, rather than emergency-patch. |
| Exploit ScenarioDerived | An application uses a djust component (e.g. breadcrumb or dj_nav) to render a URL sourced from user-controllable data; an attacker supplies a value like javascript:alert(document.cookie) (case variants such as JaVaScRiPt: also pass), which lands verbatim in the href/action attribute. When a victim clicks the link in their authenticated session, the script executes; the stored variant (URL persisted by one user and rendered to another) requires no interaction from the injecting attacker. No public exploit code exists, though the maintainer has a working private reproducer. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 16, 2026
Stored and reflected cross-site scripting in djust (pip package djust) before 1.0.7 allows a javascript: URL supplied through user-controllable data to survive into the href/action attributes of built-in component template tags, executing script in a victim's authenticated browser session when the link is clicked. Only applications that bind untrusted URLs to components such as breadcrumb, dj_nav link/dropdown/brand, citation URL, cookie-consent privacy link, error-page action or form action are affected; default djust output is not exposed. The issue is developer-usage-conditional, the assessed vector is CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N (user interaction required, low-privileged/authenticated injecting party), no public exploit identified at time of analysis, and the vendor fix is available in djust 1.0.7.
RemediationAI
Upgrade djust to 1.0.7, the vendor-released patch identified for this issue, and confirm after upgrading that the affected component tags route URL attributes through the new safe_url() scheme allowlist (the change is not explicitly itemised in the public v1.0.7 changelog, so verify rather than assume); see the advisory at https://github.com/djust-org/djust/security/advisories/GHSA-4mf4-73j6-mvrw and the release at https://github.com/djust-org/djust/releases/tag/v1.0.7. Where an immediate upgrade is not possible, the maintainer's stated workaround is to stop passing user-controllable URLs to the affected built-in component tags and instead pre-validate URL schemes in application code before binding values to component arguments - reject or blank anything that is not http, https, mailto, tel, a relative path or a fragment/anchor, and normalise case and leading whitespace/control characters before matching, since JaVaScRiPt: and similar variants bypass naive comparisons. The trade-off of scheme allowlisting is that legitimate custom or app-specific schemes (for example deep links into a native client) will be stripped or rewritten to '#', silently changing link behaviour, so validate at the point of data ingestion where possible to keep failure visible. If URLs must remain dynamic, sanitise on output in a wrapper tag as well, and adopt the upstream audit_ast/system-check rule or an equivalent static check to catch un-routed URL-attribute interpolation in templates; disabling the affected components entirely is the most conservative option but removes their functionality.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is CWE-79 (improper neutralization of input during web page generation) in djust's Django template-tag components. Each affected tag interpolates a caller-supplied URL into an executing attribute context and escapes it with Django's conditional_escape, which is sufficient to prevent attribute breakout (quotes and angle brackets become entities) but does nothing about a scheme-based payload: a javascript: URI requires no escapable characters, so 'javascript:alert(document.cookie)' passes through verbatim into <a href="javascript:alert(document.cookie)"> and fires on click. Case-mixed variants such as JaVaScRiPt: also pass, and no scheme allowlist exists anywhere in the component tag layer - a docstring at djust_components.py:781 even notes the javascript: risk without mitigating it. The reported sinks are breadcrumb (djust_components.py:1535; _advanced.py:1999,2022), dj_nav link/dropdown/brand (djust_components.py:5632,5779,5807,5830), citation URL (:6936), cookie-consent privacy link (:8240), error-page action (_advanced.py:1728) and form action (_forms.py:1239); <img src> sinks were assessed as lower risk because javascript: does not execute through img src and are therefore not exploitable via that vector. The upstream fix introduces a safe_url() helper that neutralizes javascript:, vbscript: and data: schemes to '#' while preserving http, https, mailto, tel, relative and anchor URLs, routes every href/action/formaction/xlink:href sink through it before escaping, and adds a regression test plus an audit_ast/system-check rule flagging un-routed URL-attribute interpolation.
Know when Django gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Exploitation depends on developer rendering untrusted URLs through the component (AC:H), stored injection needs an account (PR:L), href execution needs a victim click (UI:R), and XSS crosses into the victim's session context (S:C) with limited C/I impact.
Primary rating from Vendor (https://github.com/djust-org/djust).
CVSS VectorVendor: https://github.com/djust-org/djust
Lifecycle Timeline
2DescriptionCVE.org
Impact
Many djust built-in component template tags (djust.components.templatetags.*) render a developer/user-supplied URL into an href / action attribute, HTML-escaping it with conditional_escape but never validating the URL scheme. HTML escaping prevents attribute breakout but does not neutralize a javascript: URI (which needs no escapable characters), so a URL value of javascript:alert(document.cookie) lands verbatim in <a href="javascript:alert(document.cookie)"> and executes in the victim's session on click.
Affected sinks (executing href/action contexts; not exhaustive): breadcrumb (djust_components.py:1535; _advanced.py:1999,2022), dj_nav link/dropdown/brand (djust_components.py:5632,5779,5807,5830), citation URL (:6936), cookie-consent privacy link (:8240), error-page action (_advanced.py:1728), form action (_forms.py:1239). <img src> sinks are lower risk (javascript: does not execute via img src). No scheme validation exists anywhere in the component tags; a docstring at djust_components.py:781 even acknowledges the javascript: risk without mitigating it.
Severity Medium: XSS in the victim's authenticated session whenever an app renders one of these components with a URL sourced from user-controllable data; for href requires a click, worst case is the stored variant (URL persisted from one user, rendered to another). Conditional on developer usage, hence Medium rather than High.
Reproduced: breadcrumb(items=[{"label":"Home","url":"javascript:alert(document.cookie)"}]) emits <a ... href="javascript:alert(document.cookie)">Home</a>; JaVaScRiPt: case variant also passes; https:// URLs are preserved.
Patches
Add a safe_url() helper that neutralizes non-allowlisted schemes (javascript:, vbscript:, data:) to # while preserving http/https/mailto/tel/relative/anchor URLs, and route every href/action/formaction/xlink:href sink through it (then HTML-escape). Add a regression + an audit_ast/system-check rule flagging un-routed URL-attribute interpolation.
Workarounds
Do not pass user-controllable URLs to the affected built-in component tags; pre-validate URL schemes in application code before binding them to component arguments.
References
Reproducer + finding writeup retained privately by the maintainer.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
The package python/cpython from 0 and before 3.6.13, from 3.7.0 and before 3.7.10, from 3.8.0 and before 3.8.8, from 3.9
In Django 1.10.x before 1.10.8 and 1.11.x before 1.11.5, HTML autoescaping was disabled in a portion of the template for
An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. Rated critical severity (CVSS 9.8), this vulne
Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection if order_by is untrusted input
Django before 1.11.27, 2.x before 2.2.9, and 3.x before 3.0.1 allows account takeover. Rated critical severity (CVSS 9.8
An authentication/authorization bypass in the djust Python live-view framework (versions prior to 1.0.7) lets unauthenti
Unauthenticated arbitrary Python module import in djust before 1.0.7 lets any client that can reach the WebSocket or SSE
Django 1.11 before 1.11.29, 2.2 before 2.2.11, and 3.0 before 3.0.4 allows SQL Injection if untrusted data is used as a
Cross-site scripting (XSS) vulnerability in the dismissChangeRelatedObjectPopup function in contrib/admin/static/admin/j
Forged content modification in django-page-cms through 2.0.13 lets unauthenticated remote attackers exploit five CSRF-ex
Cross-site request forgery in djust's Server-Sent-Events transport affects all versions prior to 1.0.7 and allows a cros
Unauthenticated remote attackers can read live Django view and session state and invoke server-side handlers through dju
EUVD-2026-81300
GHSA-4mf4-73j6-mvrw
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB