CVE-2026-145602 in SiYuaninfo

Summary

by MITRE • 12/06/2026

SiYuan from 3.8.10 before 3.8.12 contains a DOM-based cross-site scripting vulnerability in AgentSessionPanel.ts, where model-generated session titles are inserted into an aria-label without escaping double quotes. Attackers can use prompt injection in a document to make the model return a title carrying an event handler, executing script and, on desktop, OS-level code via Node.js when the user hovers the session row.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 12/06/2026

The vulnerability identified in SiYuan versions prior to 3.8.12 represents a significant security flaw rooted in improper input validation and output encoding within the AgentSessionPanel component. Specifically, the application fails to properly sanitize model-generated session titles before inserting them into an aria-label attribute on the user interface elements. This lack of escaping for double quotes allows malicious actors to inject arbitrary JavaScript code directly into the DOM structure when a document containing specific prompt injection payloads is processed by the integrated AI agent. The core technical failure lies in the assumption that content generated by the language model is inherently safe, ignoring the reality that large language models can be manipulated through adversarial prompting techniques to output strings designed as executable scripts rather than benign text labels.

From an operational perspective, this vulnerability enables a DOM-based cross-site scripting attack where the malicious payload is triggered not necessarily upon page load or explicit user interaction with a link, but specifically when the user hovers over the affected session row in the interface. This hover-triggered execution mechanism lowers the barrier for exploitation, as it relies on natural navigation behavior rather than complex social engineering to activate the script once the vulnerable document has been opened and processed by the application. The presence of an event handler within the injected payload allows for immediate code execution upon mouse interaction with the compromised UI element, facilitating data exfiltration, session hijacking, or further lateral movement depending on the context in which SiYuan is deployed.

The severity of this vulnerability is amplified significantly when considering the desktop application variant of SiYuan, which operates using Node.js as its underlying runtime environment. In web browsers, DOM-based XSS typically results in client-side attacks such as cookie theft or phishing pages. However, within a Node.js Electron-like architecture, successful script execution can potentially escalate to operating system-level code execution if the injected payload leverages available APIs or interacts with local file systems and processes. This transforms what might otherwise be considered a standard web vulnerability into a critical remote code execution risk, allowing attackers to compromise the integrity of the host machine under certain configuration conditions where security boundaries between the renderer process and the main Node.js process are not sufficiently isolated.

This flaw aligns closely with CWE-79, which classifies improper neutralization of input during web page generation as a cross-site scripting vulnerability. Furthermore, from an offensive security framework perspective, this attack vector corresponds to ATT&CK technique T1059, specifically the execution of scripts or commands via user interaction triggers like hover events in desktop applications. The use of prompt injection to manipulate model output serves as the initial access mechanism, falling under adversarial machine learning tactics that exploit the trust placed in automated content generation systems.

Mitigation strategies must focus on both immediate patching and long-term architectural improvements. Users should immediately upgrade to SiYuan version 3.8.12 or later, where this specific input validation issue has been addressed by implementing strict output encoding for all dynamic content inserted into DOM attributes. For developers maintaining custom builds or older versions, it is critical to enforce context-aware escaping rules that specifically handle double quotes and other special characters within aria-labels and similar accessibility attributes. Additionally, adopting a Content Security Policy (CSP) with restrictive script-src directives can mitigate the impact of any remaining XSS vectors by preventing inline script execution unless explicitly whitelisted. Finally, enhancing prompt injection defenses through input filtering on the client side or implementing sandboxing for AI-generated content before it is rendered in the UI will reduce the risk of malicious payloads being generated and subsequently executed within the application environment.

Responsible

VulnCheck

Reservation

12/05/2026

Disclosure

12/06/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!