UNKNOWNCVE-2026-34448

SiYuan: Stored XSS in Attribute View Gallery/Kanban Cover Rendering Allows Arbitrary Command Execution in Desktop Client

Plattform

go

Komponente

github.com/siyuan-note/siyuan/kernel

Behoben in

3.6.2

### Summary An attacker who can place a malicious URL in an Attribute View `mAsse` field can trigger stored XSS when a victim opens the Gallery or Kanban view with “Cover From -> Asset Field” enabled. The vulnerable code accepts arbitrary `http(s)` URLs without extensions as images, stores the attacker-controlled string in `coverURL`, and injects it directly into an `<img src="...">` attribute without escaping. In the Electron desktop client, the injected JavaScript executes with `nodeIntegration` enabled and `contextIsolation` disabled, so the XSS reaches arbitrary OS command execution under the victim’s account. ### Details The vulnerable flow is: 1. `IsPossiblyImage(assetPath)` accepts arbitrary `http(s)` URLs without validating that they are safe image URLs. 2. When an Attribute View card uses `Cover From -> Asset Field`, the application copies `asset.Content` directly into `galleryCard.CoverURL / kanbanCard.CoverURL`. 3. The front-end renderer inserts `coverURL` directly into `<img src="${getCompressURL(item.coverURL)}">` without escaping quotes or other attribute-breaking characters. 4. A payload such as `https://example.com/" onerror="require('child_process').exec('calc')`

So beheben

Kein offizieller Patch verfügbar. Prüfe auf Workarounds oder überwache auf Updates.

Abhängigkeiten automatisch überwachen

Werde benachrichtigt, wenn neue Schwachstellen deine Projekte betreffen. Für immer kostenlos.

Kostenlos starten