Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/siyuan-note/siyuan/kernel
  4. ›
  5. CVE-2026-54070

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

July 10, 2026

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.

References

  • github.com/advisories/GHSA-w7cg-whh7-xp28
  • github.com/siyuan-note/siyuan/security/advisories/GHSA-w7cg-whh7-xp28
  • nvd.nist.gov/vuln/detail/CVE-2026-54070

Code Behaviors & Features

Detect and mitigate CVE-2026-54070 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.0.0-20260628153353-2d5d72223df4

Fixed versions

  • 0.0.0-20260628153353-2d5d72223df4

Solution

Upgrade to version 0.0.0-20260628153353-2d5d72223df4 or above.

Impact 7.1 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L

Learn more about CVSS

Weakness

  • CWE-184: Incomplete List of Disallowed Inputs
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

go/github.com/siyuan-note/siyuan/kernel/CVE-2026-54070.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:18:54 +0000.