CVE-2026-54070
github.com/siyuan-note/siyuan/kernel: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (CVE-2026-54070)
Beschreibung
SiYuan ist ein quelloffenes System zur persönlichen Wissensverwaltung. Vor Version 3.7.0 rendert renderPackageREADME in kernel/bazaar/readme.go eine Bazaar-Paket-README von Markdown nach HTML mit dem lute-Motor und SetSanitize(true). Der lute-Sanitizer ist ein Blocklist-Handler für Ereignisse: allowAttr lehnt nur Attributnamen ab, die in einer festen eventAttrs-Karte vorhanden sind, die aus der Legacy-Handlerliste von w3schools kopiert wurde. Diese Karte lässt moderne Ereignis-Handler außen vor. onpointerover, onpointerdown, onauxclick, onbeforetoggle, onfocusin, onanimationstart und ontransitionend fehlen in der Liste, sodass der Sanitizer sie unverändert auf jedem Tag durchlässt. Die Frontend weist das gerenderte HTML mdElement.innerHTML zu in app/src/config/bazaar.ts ohne clientseitiges DOMPurify auf diesem Pfad, in ein normales Element im Hauptdokument (kein iframe, kein sandbox). Der Kernel sendet keine Content-Security-Policy-, X-Frame-Options- oder X-Content-Type-Options-Header in jeder Antwort, sodass ein Inline-Handler ausgeführt wird, wenn das Ereignis ausgelöst wird. Die README wird gerendert, wenn ein Administrator ein Paket in den Einstellungen → Marketplace öffnet, nach der einmaligen Einwilligung zum Vertrauen des Marktplatzes. Eine Installation ist nicht erforderlich. Ergebnis: Ein Drittanbieter-Autor eines Bazaar-Pakets führt JavaScript im authentifizierten SiYuan-Origins des Administrators aus, wenn dieser das Paketlisting betrachtet und interagiert, und gewinnt die volle Kontrolle über den Arbeitsbereich. Dieser Schwachpunkt wird in Version 3.7.0 behoben.
Metriken
Weakness-Klassen (CWE)
CWE-79Base
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
cwe.mitre.org →CWE-184Base
Incomplete List of Disallowed Inputs
The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete.
cwe.mitre.org →
Re-Analyse & Statuswechsel
Chronologie der NVD-Audit-Events für diese CVE — Reanalyses, CVSS-Updates, CPE-Diffs.
- New CVE Received2026-06-24 22:16 UTC· security-advisories@github.com
- Affected: siyuan
- 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.
- CVSS V3.1: AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
- CWE: CWE-79
Betroffene Produkte
Aus der Hersteller-/CERT-Meldung extrahierte Produkte und Versionsbereiche. Ein Version-Range wie „<4.14.6“ impliziert die Update-Empfehlung „auf 4.14.6 oder höher aktualisieren“.
go
github.com/siyuan-note/siyuan/kernel