CVE-2026-34448: SiYuan: Stored XSS in Attribute View gallery/kanban cover rendering allows arbitrary command execution in the desktop client

Published Mar 31, 2026
·
Updated

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:

1. IsPossiblyImage(assetPath) accepts arbitrary http(s) URLs without validating that they are safe image URLs. 2. When an Attribute View card uses Cover From -> Asset Field, the application copies asset.Content directly into galleryCard.CoverURL / kanbanCard.CoverURL. 3. The front-end renderer inserts coverURL directly into <img src="${getCompressURL(item.coverURL)}"> without escaping quotes or other attribute-breaking characters. 4. A payload such as https://example.com/" onerror="require('childprocess').exec('calc') breaks out of the src attribute and adds an attacker-controlled onerror handler. When the image fails to load, the injected JavaScript runs in the Electron renderer. Because the desktop app enables nodeIntegration: true and disables contextIsolation and webSecurity, that JavaScript can access Node.js APIs and execute system commands.

PoC 1. Install Electron Desktop app. 2. Create a database / Attribute View with an mAsset column and add at least one row. 3. Add any legitimate image to that mAsset field so the entry is stored as type image. 4. Switch the view to Gallery or Kanban. 5.Set Cover From to Asset Field and choose the mAsset column. 6. Edit the existing image asset entry and replace its link with the following payload: https://example.com/" onerror="require('childprocess').exec('calc') 7. Save the change and reopen or refresh the Gallery / Kanban view. 8. Observe that the rendered HTML contains an injected onerror handler and the Calculator application starts on Windows.

Example rendered output: html <img loading="lazy" class="avgallery-img" src="https://example.com/" onerror="require('childprocess').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.

Other sources

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.

MITRE

Affected Software

3 affected componentsFixes available
SiYuan SiYuan<3.6.2
go/github.com/siyuan-note/siyuan/kernel<=3.6.1
3.6.2
b3log SiYuan<3.6.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/siyuan-note/siyuan/kernel to a version that resolves this vulnerability.

    Fixed in 3.6.2
  2. Upgrade

    Upgrade SiYuan to a version that resolves this vulnerability.

    Fixed in 3.6.2
  3. Configuration

    In SiYuan, disable the Gallery/Kanban cover setting “Cover From -> Asset Field” for Attribute Views to prevent injected values from being copied into galleryCard.CoverURL / kanbanCard.CoverURL and rendered into an <img src="..."> attribute.

    SiYuan Attribute View (Gallery/Kanban) Cover From -> Asset Field = disable

Event History

Mar 31, 2026
CVE Published
via MITRE·09:44 PM
Data Sourced
via MITRE·09:44 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·11:28 PM
Data Sourced
via GitHub·11:28 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-34448?

CVE-2026-34448 is classified as a high severity vulnerability due to its potential for stored XSS leading to arbitrary command execution.

2

How do I fix CVE-2026-34448?

To mitigate CVE-2026-34448, upgrade SiYuan to version 3.6.2 or later to eliminate the stored XSS vulnerability.

3

What type of vulnerability is CVE-2026-34448?

CVE-2026-34448 is a stored cross-site scripting (XSS) vulnerability affecting the SiYuan platform.

4

Which versions of SiYuan are affected by CVE-2026-34448?

CVE-2026-34448 affects all versions of SiYuan prior to version 3.6.2.

5

What can an attacker do via CVE-2026-34448?

An attacker can exploit CVE-2026-34448 to execute arbitrary commands on the desktop client through malicious URLs in the Attribute View.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203