CVE-2026-54158

SiYuan: Stored XSS to RCE via attribute-view cell rendering in genAVValueHTML()

Published Jun 24, 2026 CVSS 3.1 · 9.9 Critical EPSS < 1% KEV · Not listed
Description
SiYuan is an open-source personal knowledge management system. Prior to 3.7.0, the attribute-view (database) cell renderer genAVValueHTML interpolates cell content raw in four of its branches: text, url, phone, and mAsset. A cell value like </textarea><img src=x onerror="..."> or "><img src=x onerror="..."> breaks out of its surrounding tag and runs arbitrary JavaScript in the renderer when the victim opens the block-attribute panel. On Electron desktop the renderer runs with nodeIntegration:true, so the XSS chains to host RCE via require('child_process'). AV files live under the workspace and ride normal sync, so an attacker with write access to any synced workspace plants the payload once and it fires on every device that opens a panel containing that row.he kernel doesn't escape on the way in either, so the malicious cell persists byte-for-byte. There's no equivalent of the html.EscapeAttrVal call that protects block IAL attributes at kernel/model/blockial.go:261. This vulnerability is fixed in 3.7.0.

Analysis

AI-generated

Technical impact

SiYuan is an open‑source personal knowledge management system. Prior to version 3.7.0, the attribute‑view cell renderer genAVValueHTML interpolates cell content raw in four branches: text, url, phone, and cell value that includes a closing textarea tag followed by an image tag with an onerror attribute, such as </textarea><img src=x onerror=\"...\">. This stored cross‑site scripting flaw (CWE‑79) and its lack of proper escaping of raw input (CWE‑1188) allow the reader to break out of the surrounding tag and execute arbitrary JavaScript when the block‑attribute panel is opened. Because the Electron desktop build runs with nodeIntegration enabled, this XSS can chain to host remote code execution via require('child_process'). The payload is stored in AV files under the workspace, so an attacker with write access to any synced workspace can plant the payload once and have it trigger on every device that opens the panel. The kernel does not escape the payload, so it persists byte‑for‑byte. There is no protective call analogous to html.EscapeAttrVal to safeguard block IAL attributes at kernel/model/blockial.go:261. The vulnerability was fixed in version 3.7.0.

Affected Systems

The vulnerability affects all Siyuan deployments running a version earlier. those environments, any cell in the attribute view that contains a malicious payload—such as a closing textarea tag or an image tag with an onerror handler—will be rendered verbatim. Users or collaborators with write access to a synced workspace can embed such payloads; the malicious cell persists unchanged across devices and triggers on every device that opens a panel containing that row.

Risk and Exploitability

The CVSS score of 9.9 indicates a critical risk. The EPSS score is not available, but the absence of this metric does not diminish the inherent severity of the flaw. The vulnerability is not listed in CISA KEV, yet its exploit path remains straightforward: an attacker must be able to write to a synced workspace and subsequently entice a user to view the block‑attribute panel. Once the XSS succeeds, the local Electron environment provides direct access to the operating system, allowing arbitrary code execution.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to SiYuan 3.7.0 or newer, which sanitizes cell values in genAVValueHTML.
  • If an immediate upgrade is not possible, restrict write permissions for all users on synced workspaces until the update is applied. This prevents new malicious payloads from being introduced.
  • As an interim measure, disable executable scripting in the Electron renderer or remove the attribute‑view panel from any user interfaces that may expose the vulnerable renderer.

Generated by OpenCVE AI on June 25, 2026 at 00:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-5xfx-xj4h-5p7r SiYuan: Stored XSS to RCE via attribute-view cell rendering in genAVValueHTML()
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Siyuan
Siyuan siyuan
Vendors & Products Siyuan
Siyuan siyuan
Type Values Removed Values Added
Description SiYuan is an open-source personal knowledge management system. Prior to 3.7.0, the attribute-view (database) cell renderer genAVValueHTML interpolates cell content raw in four of its branches: text, url, phone, and mAsset. A cell value like </textarea><img src=x onerror="..."> or "><img src=x onerror="..."> breaks out of its surrounding tag and runs arbitrary JavaScript in the renderer when the victim opens the block-attribute panel. On Electron desktop the renderer runs with nodeIntegration:true, so the XSS chains to host RCE via require('child_process'). AV files live under the workspace and ride normal sync, so an attacker with write access to any synced workspace plants the payload once and it fires on every device that opens a panel containing that row.he kernel doesn't escape on the way in either, so the malicious cell persists byte-for-byte. There's no equivalent of the html.EscapeAttrVal call that protects block IAL attributes at kernel/model/blockial.go:261. This vulnerability is fixed in 3.7.0.
Title SiYuan: Stored XSS to RCE via attribute-view cell rendering in genAVValueHTML()
Weaknesses CWE-1188
CWE-79
References
Metrics cvssV3_1

{'score': 9.9, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H'}

Weaknesses
  • CWE-1188

    Initialization of a Resource with an Insecure Default

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 25, 2026, 11:12 PM
Reserved
Jun 11, 2026, 9:46 PM
Status
Deferred
Published
Jun 24, 2026, 10:16 PM
Modified
Oct 25, 2026, 11:10 PM