CVE-2026-125112

djust: A template binding inherits a context safety grant it never earned (XSS)

Published Nov 9, 2026 CVSS 4.0 · 2.3 Low EPSS < 1% KEV · Not listed
Description
djust provides Phoenix LiveView-style reactive server-side rendering for Django with Rust-powered performance. Prior to versions 1.0.10 and 1.1.2, djust keys context output-safety grants by variable name and fails to revoke a grant when a template bind replaces the value associated with that name. A template using {% with %}, {% for %}, {% include ... with %}, tuple unpacking, or assign tags can therefore rebind a name that previously held mark_safe content and emit the new attacker-controlled value without escaping, including descendant lookups through the rebound name. This can cause stored or reflected cross-site scripting when a victim renders the affected template. This issue is fixed in versions 1.0.10 and 1.1.2.

Analysis

AI-generated

Technical impact

The vulnerability arises when the djust template engine improperly propagates a context‑safety grant from a previously escaped variable to a newly bound variable that contains attacker‑controlled data. If an attacker can influence the value bound to a name that had previously been marked safe, the resulting output will be rendered without escaping, enabling storage of or reflection of malicious script. The flaw is categorized as CWE‑79 (Cross‑Site Scripting) and CWE‑116 (Incorrect Encoding or Escaping).

Affected Systems

Django applications using the djust package are affected when running any version prior to 1.0.10 and 1.1.2. The vulnerability is mitigated in release versions 1.0.10 and later, as well as in 1.1.2 and subsequent releases. The affected component is the template binding logic of djust.

Risk and Exploitability

The CVSS score of 2.3 indicates a low severity flaw, but the impact can still be significant as it allows arbitrary client‑side code execution in the context of the rendered page. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires an attacker to supply template data or modify the template itself, and the vulnerable template must be executed in a user’s browser. When these conditions are met, the cross‑site scripting impact is the same as any typical XSS scenario, enabling credential hijacking, phishing, or defacement.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade djust to version 1.0.10 or later; the fix revokes the unsafe grant that previously leaked context safety.
  • If an upgrade is not immediately possible, audit all templates for rebinding constructs such as {% with %}, {% for %}, {% include ... with %}, tuple unpacking, or assign tags, and ensure that any variable that previously held mark_safe content is not rebound to untrusted data.
  • Remove mark_safe from data that originates from user input; instead, apply proper escaping or other safe rendering mechanisms before outputting content.

Generated by OpenCVE AI on November 9, 2026 at 23:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-xjw9-38cr-6372 djust: A template binding inherits a context safety grant it never earned (XSS)
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Djust-org
Djust-org djust
Vendors & Products Djust-org
Djust-org djust
Type Values Removed Values Added
Description djust provides Phoenix LiveView-style reactive server-side rendering for Django with Rust-powered performance. Prior to versions 1.0.10 and 1.1.2, djust keys context output-safety grants by variable name and fails to revoke a grant when a template bind replaces the value associated with that name. A template using {% with %}, {% for %}, {% include ... with %}, tuple unpacking, or assign tags can therefore rebind a name that previously held mark_safe content and emit the new attacker-controlled value without escaping, including descendant lookups through the rebound name. This can cause stored or reflected cross-site scripting when a victim renders the affected template. This issue is fixed in versions 1.0.10 and 1.1.2.
Title djust: A template binding inherits a context safety grant it never earned (XSS)
Weaknesses CWE-116
CWE-79
References
Metrics cvssV4_0

{'score': 2.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-116

    Improper Encoding or Escaping of Output

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 13, 2026, 1:31 PM
Reserved
Nov 9, 2026, 5:45 PM
Status
Deferred
Published
Nov 9, 2026, 10:18 PM
Modified
Nov 13, 2026, 2:17 PM