Safeguard
Vulnerability Analysis•

CVE-2026-23852: Critical Stored XSS to RCE in SiYuan

CVE-2026-23852 is a critical stored XSS in SiYuan before 3.5.4 that can lead to code execution on desktop. Upgrade to 3.5.4 and limit API access.

Safeguard Security Team
3 min read

CVE-2026-23852 is a critical stored cross-site scripting flaw (CVSS 9.6) in SiYuan, the personal knowledge management app, in versions before 3.5.4. A crafted block icon value is rendered unsafely and can run script, and on the desktop app that can reach code execution. It bypasses an earlier fix. Upgrade to 3.5.4.

What's affected

SiYuan versions up to and including 3.5.3. The GitHub advisory lists 3.5.4 as the patched version. The advisory author tested on 3.4.2 and notes earlier versions are likely affected too.

How to check if you're exposed

Open the app, go to About, and read the version. For a self-hosted or Docker deployment, check the image tag:

docker ps --format "table {{.Names}}\t{{.Image}}"

Anything below 3.5.4 is affected. Exposure is higher if the SiYuan API is reachable from other machines, or if you open documents or synced content from people you do not fully trust.

What to do now

  1. Upgrade SiYuan to 3.5.4 or later on every desktop and server install.
  2. Do not expose the SiYuan API port to untrusted networks. Keep it on localhost or behind authentication.
  3. Be careful with workspaces shared or imported from others until you have patched.
  4. If you ran a shared instance, review block attributes for unexpected values in icon fields.

Why it matters

The two weakness classes are CWE-79, cross-site scripting, and CWE-94, code injection. In an Electron style desktop app, script running in the page can have far more reach than in a browser tab, which is how XSS turns into code execution.

This one is a bypass of an earlier fix. The advisory explains that the earlier fix limited the user interface path, while the same unsafe rendering was still reachable through the backend API. Fixes at the entry point miss problems that sit at the rendering point. Escaping output where it is written into HTML is the durable fix. The record does not list this CVE as known exploited.

Reading the severity score

The record gives a CVSS base score of 9.6, published 2026-01-19. In the vector, the attacker works over the network, needs no account, and the attack is low in complexity. User interaction is required. Impact on confidentiality is high, on integrity high and on availability high.

A base score describes the flaw in general, not your risk. Weigh it against how exposed your instance is and what it can reach. The Gold page for the CVE keeps the score, weakness and references together.

Hardening beyond the patch

Desktop knowledge tools hold personal and company notes, so treat them as sensitive software. Keep the SiYuan API bound to localhost unless you need remote access, and when you do, put it behind an authenticated reverse proxy. Turn on the access authorization code the app offers. Back up your workspace before upgrading. If you sync a workspace between machines, patch every machine, because a single unpatched client can render content that another client stored.

Quick check

Why can XSS lead to code execution here?

The advisory says that in the desktop environment, the injected script can lead to remote code execution. The desktop app gives page script more privileges than a normal web page has.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.