Quick Take
- What: SiYuan’s AI agent chat panel renders the final assistant message as unsanitized HTML, creating a DOM cross-site scripting flaw that can execute operating-system commands in desktop local-kernel mode.
- Who is affected: SiYuan desktop users running versions 3.7.0 through 3.8.10 in local-kernel mode; remote-kernel mode applies a Content-Security-Policy without unsafe-inline.
- Fixed version: Advisory names v3.8.11, but only alpha pre-releases are published; v3.8.10 remains the latest stable release as of November 16, 2026.
- What to do: Treat the agent panel as untrusted until a stable release carries the fix, delete saved agent sessions that could hold a payload, and point the panel only at model endpoints you control.
- Attack routes: A model reproducing attacker-influenced markup it read (indirect prompt injection), or a configured model endpoint returning the markup directly.
In plain English
SiYuan is a note-taking app with an AI agent chat panel. The panel shows you clean text while the AI is typing its answer, but when the answer finishes, the app replaces that preview with the raw HTML version without checking it for dangerous code.
What you should do: If you use the desktop app in local-kernel mode (the default setup), a malicious answer can run commands on your computer with your user privileges. The problem affects versions 3.7.0 through 3.8.10. The maintainer published a fix in version 3.8.11, but only test versions are available; the stable release is still 3.8.10, which is vulnerable. If you use SiYuan’s AI chat feature, avoid it until a stable fix is released, delete any saved chat sessions, and only connect to AI services you trust completely.
What happened
SiYuan published advisory GHSA-3rvg-qxwg-f3c6 on November 11, 2026 for a DOM cross-site scripting flaw in its AI agent chat panel. The reporter is credited as president-xd. Versions 3.7.0 through 3.8.10 of the siyuan npm package are affected, and the advisory names v3.8.11 as the patched version. The maintainer scores the flaw 7.5.
The chat panel builds its Markdown engine without HTML sanitization enabled, then assigns the rendered assistant output to innerHTML. A second engine instance sanitizes the streaming preview, so a user sees clean text while the reply streams and the unsanitized body replaces it when the stream ends, stops or errors. Block-level raw HTML in a reply keeps its inline event-handler attributes, and attributes supplied through kramdown attribute-list syntax survive even where sanitization is on.
In desktop local-kernel mode the window runs with Node.js integration enabled and no active Content-Security-Policy, so a handler can call Node APIs and run operating-system commands with the user’s privileges. Remote-kernel mode applies a Content-Security-Policy without unsafe-inline.
Attack routes
The advisory describes two routes into the agent’s reply. Indirect prompt injection is the first: the agent reads attacker-influenced material and the model reproduces the malicious markup, a route the advisory calls probabilistic. A model endpoint the user configured, returning the markup directly, is the second and deterministic route. Saved sessions then re-execute the payload whenever they are reopened.
What you should do
SiYuan’s advisory names v3.8.11 as the patched version, but the project’s releases page shows only v3.8.11 alpha pre-releases, the most recent published on November 16, 2026. Version 3.8.10, released November 10, is still marked as the latest stable release and sits inside the affected range. Anyone waiting for a stable fix has nothing to install yet.
Treat SiYuan’s agent panel as untrusted until a stable release carries the fix. Delete saved agent sessions that could hold a payload, since reopening one runs it again, and point the panel only at model endpoints you control.



