CVE-2026-54070: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in siyuan-note siyuan
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.
AI Analysis
Technical Summary
SiYuan, an open-source knowledge management system, prior to version 3.7.0, improperly neutralizes input during web page generation in the renderPackageREADME function. The sanitizer used (lute engine with SetSanitize(true)) relies on a legacy event-handler blocklist that omits modern event handlers such as onpointerover and onanimationstart. These attributes are passed through unfiltered and assigned to innerHTML in the frontend without additional client-side sanitization or protective headers like Content-Security-Policy. This allows a third-party Bazaar package author to execute arbitrary JavaScript in the Administrator's authenticated session when the package README is viewed, resulting in full control over the workspace. The vulnerability is resolved in version 3.7.0.
Potential Impact
An attacker controlling a third-party Bazaar package can execute arbitrary JavaScript in the context of an Administrator's authenticated session by exploiting the XSS vulnerability. This leads to full compromise of the SiYuan workspace, including potential data theft, manipulation, or further system compromise. The attack requires the Administrator to view and interact with the malicious package listing after granting marketplace trust consent.
Mitigation Recommendations
This vulnerability is fixed in SiYuan version 3.7.0. Users should upgrade to version 3.7.0 or later to remediate this issue. No additional vendor advisory or patch links are provided, but upgrading to the fixed version is the recommended action. There are no indications that the vendor provides temporary fixes or that the vulnerability is mitigated by other means.
CVE-2026-54070: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in siyuan-note 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
Score 7.1high
Affected software
pkg:github/siyuan-note/siyuanRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
SiYuan, an open-source knowledge management system, prior to version 3.7.0, improperly neutralizes input during web page generation in the renderPackageREADME function. The sanitizer used (lute engine with SetSanitize(true)) relies on a legacy event-handler blocklist that omits modern event handlers such as onpointerover and onanimationstart. These attributes are passed through unfiltered and assigned to innerHTML in the frontend without additional client-side sanitization or protective headers like Content-Security-Policy. This allows a third-party Bazaar package author to execute arbitrary JavaScript in the Administrator's authenticated session when the package README is viewed, resulting in full control over the workspace. The vulnerability is resolved in version 3.7.0.
Potential Impact
An attacker controlling a third-party Bazaar package can execute arbitrary JavaScript in the context of an Administrator's authenticated session by exploiting the XSS vulnerability. This leads to full compromise of the SiYuan workspace, including potential data theft, manipulation, or further system compromise. The attack requires the Administrator to view and interact with the malicious package listing after granting marketplace trust consent.
Mitigation Recommendations
This vulnerability is fixed in SiYuan version 3.7.0. Users should upgrade to version 3.7.0 or later to remediate this issue. No additional vendor advisory or patch links are provided, but upgrading to the fixed version is the recommended action. There are no indications that the vendor provides temporary fixes or that the vulnerability is mitigated by other means.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-11T18:24:35.097Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a3c501e4853345fc1e45c48
Added to database: 06/24/2026, 21:46:06 UTC
Last enriched: 07/11/2026, 09:50:34 UTC
Last updated: 08/09/2026, 00:41:15 UTC
Views: 53
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.