Cross-Site Scripting (XSS) in djust (CVE-2026-61597)
Summary
Cross-site scripting in djust (CVE-2026-61597). Risk of unauthorized operations or information disclosure. Exploitable via href. Mitigation: upgrade to 1.0.7 or later.
Original description
The description as published by the source.
Impact
Many djust built-in component template tags (djust.components.templatetags.*) render a developer/user-supplied URL into an href / action attribute, HTML-escaping it with conditional_escape but never validating the URL scheme. HTML escaping prevents attribute breakout but does not neutralize a javascript: URI (which needs no escapable characters), so a URL value of javascript:alert(document.cookie) lands verbatim in `` and executes in the victim's session on click.
Affected sinks (executing href/action contexts; not exhaustive): breadcrumb (djust_components.py:1535; _advanced.py:1999,2022), dj_nav link/dropdown/brand (djust_components.py:5632,5779,5807,5830), citation URL (:6936), cookie-consent privacy link (:8240), error-page action (_advanced.py:1728), form action (_forms.py:1239). `` sinks are lower risk (javascript: does not execute via img src). No scheme validation exists anywhere in the component tags; a docstring at djust_components.py:781 even acknowledges the javascript: risk without mitigating it.
Severity Medium: XSS in the victim's authenticated session whenever an app renders one of these components with a URL sourced from user-controllable data; for href requires a click, worst case is the stored variant (URL persisted from one user, rendered to another). Conditional on developer usage, hence Medium rather than High.
Reproduced: `breadcrumb(items=[{"label":"Home","url":"javascript:alert(document.cookie)"…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-61597 has been found in djust.
Attackers can target a specific entry point like href over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade djust to 1.0.7 or later.
If unsure, ask your IT team or search "djust CVE-2026-61597" on the vendor's site.
CVE-2026-61597 (djust) — CWE-79
Attack surface: href / action / conditional_escape / dj_nav
Patched: 1.0.7 — apply immediately
Workaround: Do not pass user-controllable URLs to the affected built-in component tags; pre-validate URL schemes in application code before binding them to component arguments.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Cross-site scripting (XSS) (CWE-79) exists in djust. Attackers reach the vulnerable code path via href.
Check the vendor advisory for the affected versions of djust. Attack surface: href / action / conditional_escape / dj_nav.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 1.0.7.
Workaround: Do not pass user-controllable URLs to the affected built-in component tags; pre-validate URL schemes in application code before binding them to component arguments.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'djust' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'djust' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
djustを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
Do not pass user-controllable URLs to the affected built-in component tags; pre-validate URL schemes in application code before binding them to component arguments.パッチが適用されるまでの応急処置として、Do not pass user-controllable URLs to the affected built-in component tags; pre-validate URL schemes in application code before binding them to component arguments. を実施。回避策の副作用 (機能低下) を確認した上で。
-
3Apply patch patch
Upgrade djust to 1.0.7ステージング環境で 1.0.7 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- web github.com
- web github.com
- web github.com