CVE-2026-137469 in SiYuaninfo

Summary

by MITRE • 11/26/2026

SiYuan 3.7.0 before 3.8.11 contains a DOM-based cross-site scripting vulnerability in the AI agent chat panel, which renders final and saved assistant replies into innerHTML without HTML sanitisation. Attackers influencing model replies via indirect prompt injection or a configured model endpoint can inject event-handler markup, executing OS commands through Node.js integration in desktop local-kernel mode.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 11/26/2026

The vulnerability identified in SiYuan versions prior to 3.8.11 represents a critical security flaw within the AI agent chat panel interface, specifically classified as a DOM-based cross-site scripting (XSS) issue. This weakness stems from an improper handling of user-controllable data where final and saved assistant replies are rendered directly into the Document Object Model using innerHTML without any form of HTML sanitization or encoding. In standard web application security practices, rendering untrusted input directly into the DOM is a fundamental error that allows attackers to inject malicious scripts which then execute within the context of the victim's browser session. This specific implementation flaw bypasses common defenses because the data originates from an AI model response rather than direct user form submission, making it less obvious to developers who might assume external API responses are inherently safe or already sanitized by upstream services.

The operational impact of this vulnerability is significantly amplified in desktop local-kernel mode due to the integration with Node.js. In standard web environments, XSS typically leads to session hijacking, defacement, or phishing attacks limited to the browser sandbox. However, when SiYuan operates in its desktop configuration using a local kernel, it leverages Electron or similar frameworks that expose Node.js APIs to the frontend JavaScript context. This architectural decision means that an executed script is not confined to standard web restrictions but can interact with the underlying operating system. Consequently, if an attacker successfully injects malicious event-handler markup into the AI response, they gain the ability to execute arbitrary OS commands on the user's machine through Node.js child processes or file system access modules available in this environment.

The attack vector for exploiting this flaw relies heavily on indirect prompt injection techniques. An adversary does not need direct control over the SiYuan application interface but must influence the AI model's output. This can be achieved by manipulating the training data, fine-tuning prompts, or configuring a malicious model endpoint that returns responses containing hidden HTML event handlers such as onload or onclick attributes embedded within seemingly benign text. When the user views these saved replies in the chat panel, the browser parses the innerHTML content and executes the injected code immediately upon rendering. This method of attack is particularly insidious because it exploits trust in both the AI assistant's output and the application's local execution environment, bypassing traditional input validation checks that focus on direct user entries rather than generated content.

From a classification perspective, this vulnerability aligns with CWE-79, which covers Improper Neutralization of Input During Web Page Generation commonly known as Cross-site Scripting. Furthermore, given the ability to execute arbitrary commands in a desktop application context via injected scripts, it also maps closely to CWE-94, specifically Code Injection involving server-side or local execution contexts. In terms of adversary tactics, this scenario reflects ATT&CK technique T1059, Command and Scripting Interpreter, where attackers use system utilities like Node.js to execute commands post-exploitation. The indirect nature of the injection also touches upon social engineering aspects found in techniques related to prompt injection, which is an emerging threat vector in AI-integrated applications that requires new defensive paradigms beyond traditional web security measures.

Mitigation strategies must address both the immediate code flaw and broader architectural risks associated with local-kernel modes. The primary remediation involves implementing strict output encoding or HTML sanitization libraries such as DOMPurify before any content is rendered via innerHTML. Developers should ensure that all dynamic content, including AI-generated responses, passes through a rigorous filtering process that strips out dangerous tags, attributes, and event handlers. Additionally, for desktop applications utilizing Node.js integrations, it is crucial to disable nodeIntegration in the renderer process or utilize context isolation features provided by Electron frameworks to prevent frontend scripts from accessing sensitive backend APIs. Regular security audits focusing on AI integration points are recommended to identify similar vulnerabilities where generated content might bypass standard input validation controls.

Responsible

VulnCheck

Reservation

11/26/2026

Disclosure

11/26/2026

Moderation

accepted

CPE

ready

EPSS

0.00505

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!