9.1critical
SiYuan: Stored XSS in Attribute View gallery/kanban cover rendering allows arbitrary command execution in the desktop client
- Severity
- 9.1critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.55% (higher than 47% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-rx4h-526q-4458GO-2026-5644
Description
SiYuan is a personal knowledge management system. Prior to version 3.6.2, an attacker who can place a malicious URL in an Attribute View mAsse field can trigger stored XSS when a victim opens the Gallery or Kanban view with “Cover From -> Asset Field” enabled. The vulnerable code accepts arbitrary http(s) URLs without extensions as images, stores the attacker-controlled string in coverURL, and injects it directly into an <img src="..."> attribute without escaping. In the Electron desktop client, the injected JavaScript executes with nodeIntegration enabled and contextIsolation disabled, so the XSS reaches arbitrary OS command execution under the victim’s account. This issue has been patched in version 3.6.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| siyuan-note siyuan | < 3.6.2 | CVE List |
| github.com/siyuan-note/siyuan/kernel (Go) | before 3.6.2, all versions | GitHub Advisory Database, Go Vulnerability Database |
| b3log siyuan | before 3.6.2 | NVD |
All scores
| GitHub_M | 9.1critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H |
| GitHub | 9.0critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H |
Classification
What each source says
CVE List
SiYuan is a personal knowledge management system. Prior to version 3.6.2, an attacker who can place a malicious URL in an Attribute View mAsse field can trigger stored XSS when a victim opens the Gallery or Kanban view with “Cover From -> Asset Field” enabled. The vulnerable code accepts arbitrary http(s) URLs without extensions as images, stores the attacker-controlled string in coverURL, and injects it directly into an <img src="..."> attribute without escaping. In the Electron desktop client, the injected JavaScript executes with nodeIntegration enabled and contextIsolation disabled, so the XSS reaches arbitrary OS command execution under the victim’s account. This issue has been patched in version 3.6.2.
GitHub Advisory Database
Summary
An attacker who can place a malicious URL in an Attribute View mAsse field can trigger stored XSS when a victim opens the Gallery or Kanban view with “Cover From -> Asset Field” enabled. The vulnerable code accepts arbitrary http(s) URLs without extensions as images, stores the attacker-controlled string in coverURL, and injects it directly into an <img src="..."> attribute without escaping. In the Electron desktop client, the injected JavaScript executes with nodeIntegration enabled and contextIsolation disabled, so the XSS reaches arbitrary OS command execution under the victim’s account.
Details
The vulnerable flow is:
IsPossiblyImage(assetPath)accepts arbitraryhttp(s)URLs without validating that they are safe image URLs.- When an Attribute View card uses
Cover From -> Asset Field, the application copiesasset.Contentdirectly intogalleryCard.CoverURL / kanbanCard.CoverURL. - The front-end renderer inserts
coverURLdirectly into<img src="${getCompressURL(item.coverURL)}">without escaping quotes or other attribute-breaking characters. - A payload such as
https://example.com/" onerror="require('child_process').exec('calc')breaks out of thesrcattribute and adds an attacker-controlledonerrorhandler. When the image fails to load, the injected JavaScript runs in the Electron renderer. Because the desktop app enablesnodeIntegration: trueand disablescontextIsolationandwebSecurity, that JavaScript can access Node.js APIs and execute system commands.
PoC
- Install Electron Desktop app.
- Create a database / Attribute View with an mAsset column and add at least one row.
- Add any legitimate image to that mAsset field so the entry is stored as type image.
- Switch the view to Gallery or Kanban. 5.Set Cover From to Asset Field and choose the mAsset column.
- Edit the existing image asset entry and replace its link with the following payload:
https://example.com/" onerror="require('child_process').exec('calc')
- Save the change and reopen or refresh the Gallery / Kanban view.
- Observe that the rendered HTML contains an injected onerror handler and the Calculator application starts on Windows.
Example rendered output:
<img loading="lazy" class="av__gallery-img" src="https://example.com/" onerror="require('child_process').exec('calc')">
Impact
An attacker can store malicious content in a database asset field and execute arbitrary JavaScript when another user opens the affected Gallery or Kanban view. In the desktop client, that JavaScript has access to Node.js APIs, so the impact is not limited to browser-context XSS. The payload executes OS commands with the victim’s local user privileges, which turns this into remote code execution on the desktop application once the malicious content is delivered and rendered.
Go Vulnerability Database
SiYuan: Stored XSS in Attribute View Gallery/Kanban Cover Rendering Allows Arbitrary Command Execution in Desktop Client in github.com/siyuan-note/siyuan/kernel.
NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.
(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)
The additional affected modules and versions are: github.com/siyuan-note/siyuan/kernel before v3.6.2.
NVD (es)
SiYuan es un sistema de gestión de conocimiento personal. Antes de la versión 3.6.2, un atacante que puede colocar una URL maliciosa en un campo 'mAsse' de la vista de atributos puede desencadenar XSS almacenado cuando una víctima abre la vista de Galería o Kanban con 'Cubrir desde -> Campo de activo' habilitado. El código vulnerable acepta URLs HTTP(s) arbitrarias sin extensiones como imágenes, almacena la cadena controlada por el atacante en 'coverURL' y la inyecta directamente en un atributo '<img src="..."> sin escapar. En el cliente de escritorio Electron, el JavaScript inyectado se ejecuta con 'nodeIntegration' habilitado y 'contextIsolation' deshabilitado, por lo que el XSS alcanza la ejecución arbitraria de comandos del sistema operativo bajo la cuenta de la víctima. Este problema ha sido parcheado en la versión 3.6.2.
References
| https://github.com/siyuan-note/siyuan/security/advisories/GHSA-rx4h-526q-4458 | advisory, exploit, vendor-advisory, web | |
| https://github.com/siyuan-note/siyuan/issues/17246 | issue-tracking, web | |
| https://github.com/siyuan-note/siyuan/releases/tag/v3.6.2 | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-34448 | advisory | |
| https://github.com/siyuan-note/siyuan | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-34448 changed 2026-04-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-rx4h-526q-4458 changed 2026-06-25 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-5644 changed 2026-06-25 | CC-BY-4.0 |
| NVD | CVE-2026-34448 changed 2026-07-24 | Public domain |