Vulnerability  ·  2026-11-27

SiYuan AI agent chat panel DOM XSS to OS command execution via indirect prompt injection

VulnerabilityHigh impactGlobalCVE-2026-137469
The AI agent chat panel renders final/saved assistant replies into innerHTML without HTML sanitisation (the streaming preview is sanitised but the final render is not). The advisory confirms a working chain in a real Electron renderer: an assistant reply containing an HTML inline event handler is auto-fired, and with Node integration enabled executes OS commands.
This closes the loop from prompt injection to real code execution on a user's desktop. An attacker who can inject content an AI agent reads — or who controls a model endpoint — can achieve code execution on the host, an agent-native attack path rather than a generic XSS.
The AI agent chat panel builds a Markdown engine without HTML sanitisation and assigns the final assistant reply to innerHTML. A party able to influence a model reply — via indirect prompt injection in material the agent reads, or a configured model endpoint returning markup — can have script run in the application window; in the desktop local-kernel mode (nodeIntegration true, no CSP) this reaches require('child_process') and executes OS commands with the user's privileges.
SiYuan 3.7.0 before 3.8.11 (AI agent chat panel)
Upgrade to SiYuan 3.8.11 or later (fix in advisory GHSA-3rvg-qxwg-f3c6). Run in remote-kernel mode where a CSP is applied, and avoid routing the agent over untrusted content or unvetted model endpoints.
SiYuan GitHub Security Advisory GHSA-3rvg-qxwg-f3c6NVD — CVE-2026-137469
See this in the live feed Explore related AI security and governance findings — updated every morning.
Open the feed →