XSS (Cross-Site Scripting) dans github.com/siyuan-note/siyuan/kernel (CVE-2026-39846)
Résumé
XSS dans github.com/siyuan-note/siyuan/kernel (CVE-2026-39846). L'exploitation peut entraîner la prise de contrôle totale du système. Exploitable via nodeIntegration. Atténuation : mise à jour vers 0.0.0-20260407035653-2f416e5253f1 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Summary
A malicious note synced to another user can trigger remote code execution in the SiYuan Electron desktop client. The root cause is that table caption content is stored without safe escaping and later unescaped into rendered HTML, creating a stored XSS sink. Because the desktop renderer runs with nodeIntegration enabled and contextIsolation disabled, attacker-controlled JavaScript executes with access to Node.js APIs. In practice, an attacker can import a crafted note into a synced workspace, wait for the victim to sync, and achieve code execution when the victim opens the note.
Details
The vulnerability exists in the table caption handling path. When a table block is parsed, the caption attribute is saved into the node's IAL properties without proper HTML escaping. Later, during rendering, that value is read back, passed through HTML unescaping, and written directly into the output DOM. This turns an attacker-controlled caption into active HTML inside the rendered note.
I confirmed that a crafted table caption containing encoded HTML such as <img src=x onerror=...> is rendered as a live DOM element instead of inert text. This makes the issue a stored XSS. I also confirmed that the most practical delivery path is not Markdown import, but a crafted .sy.zip note imported into a synced workspace. Once synced to another desktop client, opening the note executes the payload automatically.
In the Electron desktop client, this XSS results in code ex…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2026-39846 a été découverte dans github.com/siyuan-note/siyuan/kernel.
Des attaquants peuvent cibler un point d'entrée spécifique comme nodeIntegration à distance pour détourner le produit.
L'exploitation peut entraîner la prise de contrôle totale du système. Score CVSS : 9.0/10.
Action : mettez à jour github.com/siyuan-note/siyuan/kernel vers 0.0.0-20260407035653-2f416e5253f1 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « github.com/siyuan-note/siyuan/kernel CVE-2026-39846 » sur le site de l'éditeur.
CVE-2026-39846 (github.com/siyuan-note/siyuan/kernel) — CWE-79 / CVSS v3 9.0
Vecteur d'attaque : distant (réseau)
Surface d'attaque : nodeIntegration / contextIsolation / caption
Correctif : 0.0.0-20260407035653-2f416e5253f1 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une XSS (CWE-79) affecte github.com/siyuan-note/siyuan/kernel. Les attaquants atteignent le code vulnérable via nodeIntegration.
Consultez l'avis de l'éditeur pour les versions affectées de github.com/siyuan-note/siyuan/kernel. Surface d'attaque : nodeIntegration / contextIsolation / caption.
Gravité : Critique (CVSS 9.0/10). L'exploitation peut entraîner la prise de contrôle totale du système.
Mettre à jour vers 0.0.0-20260407035653-2f416e5253f1.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify 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 し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade github.com/siyuan-note/siyuan/kernel to 0.0.0-20260407035653-2f416e5253f1ステージング環境で 0.0.0-20260407035653-2f416e5253f1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- advisory nvd.nist.gov
- package github.com
- web github.com