Skip to main content
VulnerabilityPublished

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

Affects djustSource GCVE Database

0

CVSS 8.7 High : upgrade to 1.1.2 soon.

Data as of 18 Sep 2026, 01:27 UTC

CVSS 4.0 base score
8.7High
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 1.1.2
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

What to do

Upgrade djust to 1.1.2.

Affected software

ProductAffectedFixed in
PyPIdjustAffected
  • <1.1.2
Fixed in
  • 1.1.2

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available in djust version 1.1.2 and later. Users should upgrade to at least version 1.1.2 to remediate this vulnerability. Until upgrading, avoid reusing context variable names for both mark_safe'd content and untrusted input, and avoid rebinding such names in template constructs like {% with %}, {% for %}, {% include … with %}, or assign tags.

Description

djust versions prior to 1.1.2 contain a vulnerability where a template binding inherits a context safety grant it never earned, leading to stored or reflected cross-site scripting (XSS). This occurs when a view marks a value safe (e.g., using mark_safe) and a template later rebinds that name to attacker-controlled input, causing the safety mark to be incorrectly retained. The issue affects multiple template binding constructs such as {% with %}, {% for %}, {% include … with %}, and assign tags. The vulnerability is fixed in version 1.1.2 and later.

References

Community reviews

Loading reviews…