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.
Published: 2026-06-24
Score: 9.9 Critical
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

SiYuan, an open‑source personal knowledge management system, suffered a stored cross‑site scripting flaw in the attribute‑view cell renderer. The function genAVValueHTML interpolated cell values directly, allowing someone to embed HTML that breaks out of a surrounding element and executes JavaScript when the block‑attribute panel is opened. Because the Electron desktop build runs with nodeIntegration enabled, the malicious script can call Node.js APIs such as require('child_process'), elevating the XSS into a remote code execution vulnerability. The flaw is grounded in CWE‑79 (Cross‑Site Scripting) and CWE‑1188 (Improper Content Handling).

Affected Systems

The vulnerability affects all Siyuan deployments running a version earlier than 3.7.0. In 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 payload persists unchanged across devices and triggers on every device that opens the corrupted block‑attribute panel.

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. The attack can be performed without additional network interaction beyond the normal sync traffic, making it highly plausible in collaborative settings.

Generated by OpenCVE AI on June 24, 2026 at 22:28 UTC.

Remediation

No vendor fix or workaround currently provided.

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 24, 2026 at 22:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 24 Jun 2026 21:45:00 +0000

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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-24T21:19:16.988Z

Reserved: 2026-06-11T21:46:52.379Z

Link: CVE-2026-54158

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-24T22:30:15Z

Weaknesses
  • CWE-1188

    Initialization of a Resource with an Insecure Default

  • CWE-79

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