Categories
CVE-2026-33066

Cross-Site Scripting (XSS) in github.com/siyuan-note/siyuan/kernel (CVE-2026-33066)

Summary

Cross-site scripting in github.com/siyuan-note/siyuan/kernel (CVE-2026-33066). Risk of unauthorized operations or information disclosure. Exploitable via renderREADME. Mitigation: upgrade to 0.0.0-20260314111550-b382f50e1880 or later.

Original description

The description as published by the source.

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 (renderREADME function)
  • README rendering (frontend): app/src/config/bazaar.ts:607 (innerHTML assignment)
  • 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 strin…

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-33066 has been found in github.com/siyuan-note/siyuan/kernel.
Attackers can target a specific entry point like renderREADME over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade github.com/siyuan-note/siyuan/kernel to 0.0.0-20260314111550-b382f50e1880 or later.
If unsure, ask your IT team or search "github.com/siyuan-note/siyuan/kernel CVE-2026-33066" on the vendor's site.

CVE-2026-33066 (github.com/siyuan-note/siyuan/kernel) — CWE-79
Attack surface: renderREADME / innerHTML / README.md / onerror
Patched: 0.0.0-20260314111550-b382f50e1880 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Cross-site scripting (XSS) (CWE-79) exists in github.com/siyuan-note/siyuan/kernel. Attackers reach the vulnerable code path via renderREADME.

📍 Affected scope

Check the vendor advisory for the affected versions of github.com/siyuan-note/siyuan/kernel. Attack surface: renderREADME / innerHTML / README.md / onerror.

🔥 Severity

Severity: ?. Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to 0.0.0-20260314111550-b382f50e1880.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'github.com/siyuan-note/siyuan/kernel' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'github.com/siyuan-note/siyuan/kernel' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で github.com/siyuan-note/siyuan/kernel を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade github.com/siyuan-note/siyuan/kernel to 0.0.0-20260314111550-b382f50e1880

    ステージング環境で 0.0.0-20260314111550-b382f50e1880 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

Go github.com/siyuan-note/siyuan/kernel
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.0.0-20260314111550-b382f50e1880"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details