Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. djust
  4. ›
  5. GHSA-xjw9-38cr-6372

GHSA-xjw9-38cr-6372: djust: A template binding inherits a context safety grant it never earned (XSS)

September 17, 2026

A context safety grant was inherited by a template binding that never earned it, so rebinding a name the view had marked safe left the mark attached to the new, attacker-controlled value.

djust’s context safety channel is keyed by name, not by value. Every bind copied the value and left the grant in place:

view marks   p = mark_safe('<b>trusted</b>')
template     {% with p=user_input %}{{ p }}{% endwith %}

djust   '<img src=x onerror=alert(1)>'          <- executes
django  '&lt;img src=x onerror=alert(1)&gt;'

References

  • github.com/advisories/GHSA-xjw9-38cr-6372
  • github.com/djust-org/djust/releases/tag/v1.1.2
  • github.com/djust-org/djust/security/advisories/GHSA-xjw9-38cr-6372

Code Behaviors & Features

Detect and mitigate GHSA-xjw9-38cr-6372 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 1.1.2

Fixed versions

  • 1.1.2

Solution

Upgrade to version 1.1.2 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-116: Improper Encoding or Escaping of Output
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/djust/GHSA-xjw9-38cr-6372.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:19 +0000.