Summary
SiYuan contains a stored cross-site scripting flaw in the Attribute View header: a persisted view name is inserted into the panel without proper escaping. When a desktop user opens the panel, the injected script may run in the application context and, where Node.js access is available, could execute OS commands.
Affected context
The issue affects SiYuan versions before 3.8.10 in the row attribute panel rendering path. It occurs when renderAVAttribute() displays an Attribute View name without escaping it; an attacker must be able to persist a crafted name, for example through the setAttrViewName action, and a desktop user must open the affected panel for the script to run. This is described as an incomplete fix for CVE-2026-44670.
Exploit preconditions
- Attack surface: Attribute View name rendering in the database row attribute panel
- Required access: Ability to persist or change an Attribute View name, such as through the relevant action
- Trigger point: A desktop user opens the panel displaying the crafted name
- Why exploitation is possible: The name is inserted into rendered content without adequate output escaping; Node.js access in the desktop context may expose OS command execution capabilities
Why this happens
The rendering code treats a persisted Attribute View name as trusted content rather than untrusted text. Failing to apply context-appropriate output encoding can cause the browser or embedded web view to interpret the value as active markup or script, which maps to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). The reported incomplete fix indicates that a related rendering path remained unsafe.
Potential impact
- Injected script may run when a user opens the affected panel
- Attacker-controlled actions may be performed in the application context
- If Node.js access is available to the rendered content, OS commands may be executed with the desktop user's privileges
- Local data or application integrity could be affected
General mitigation guidance
Defensive measures generally focus on treating persisted names as untrusted data at every rendering boundary.
- Apply context-appropriate output encoding when inserting names into UI content
- Prefer text-only rendering APIs over HTML interpretation for user-controlled values
- Validate names against the intended format without relying on validation as a substitute for output encoding
- Keep the desktop rendering context isolated from Node.js and other privileged capabilities unless strictly required
- Apply least privilege to the desktop process and limit access to sensitive local resources
- Review related rendering paths to ensure fixes cover all places where the same data is displayed
How teams detect issues like this
- Use static analysis to identify untrusted values flowing into HTML or web-view rendering sinks without context-aware encoding
- Review code that renders Attribute View names and other persisted labels, including alternate or legacy rendering paths
- Add tests that verify special characters in stored names are displayed as text rather than interpreted as markup
- Enforce code review or CI policies requiring safe rendering APIs and restricted desktop web-view privileges
- Consider automated security review tools to flag unsafe data flows and privileged renderer configurations

