CVE-2026-54070 SiYuan: Stored XSS in Bazaar marketplace via package README event handlers

High 7.1 Published Updated

A stored XSS vulnerability in SiYuan allows attackers to execute arbitrary JavaScript in an Administrator's session via malicious package READMEs.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-54070?

CVE-2026-54070 is a high-severity cross-site scripting vulnerability in siyuan-note siyuan, published on 24 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

SiYuan is an open-source personal knowledge management system. Prior to 3.7.0, renderPackageREADME in kernel/bazaar/readme.go renders a Bazaar package README from Markdown to HTML with the lute engine and SetSanitize(true). The lute sanitizer is an event-handler blocklist: allowAttr rejects only attribute names present in a fixed eventAttrs map copied from the w3schools legacy handler list. That map omits modern event handlers. onpointerover, onpointerdown, onauxclick, onbeforetoggle, onfocusin, onanimationstart, and ontransitionend are not in the list, so the sanitizer passes them through verbatim on any tag. The frontend assigns the rendered HTML to mdElement.innerHTML in app/src/config/bazaar.ts with no client-side DOMPurify on this path, into a normal element in the main document (no iframe, no sandbox). The kernel sends no Content-Security-Policy, X-Frame-Options, or X-Content-Type-Options header on any response, so an inline handler runs when its event fires. The README is rendered when an Administrator opens a package in Settings → Marketplace, after the one-time marketplace trust consent. Install is not required. Result: a third-party Bazaar package author runs JavaScript in the Administrator's authenticated SiYuan origin when the Administrator views and interacts with the package listing, and gains full control of the workspace. This vulnerability is fixed in 3.7.0.

Weakness: CWE-79, CWE-184

Which versions are affected by CVE-2026-54070?

3 open source packages ship an affected version, including github.com/siyuan-note/siyuan/kernel.

PackageAffectedFixed in
github.com/siyuan-note/siyuan/kernel GoAll versions0.0.0-20260628153353-2d5d72223df4
github.com/siyuan-note/siyuan/kernel GoAll versions0.0.0-20260628153353-2d5d72223df4
github.com/siyuan-note/siyuan/kernel GoAll versions0.0.0-20260628153353-2d5d72223df4

How do I fix CVE-2026-54070?

Upgrade github.com/siyuan-note/siyuan/kernel to 0.0.0-20260628153353-2d5d72223df4 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-54070 being exploited?

There is no known exploitation of CVE-2026-54070 in the wild and no public exploit code.

Sources

Also known as GHSA-w7cg-whh7-xp28, GO-2026-5965.

Is CVE-2026-54070 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free