{"id":"CVE-2026-34448","aliases":["CVE-2026-34448","GHSA-rx4h-526q-4458","GO-2026-5644"],"related":[],"kind":"vulnerability","state":"published","title":"SiYuan: Stored XSS in Attribute View gallery/kanban cover rendering allows arbitrary command execution in the desktop client","summary":"SiYuan is a personal knowledge management system. Prior to version 3.6.2, 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. This issue has been patched in version 3.6.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"SiYuan is a personal knowledge management system. Prior to version 3.6.2, 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. This issue has been patched in version 3.6.2.","source":"cvelist"},{"lang":"en","text":"### Summary\nAn 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.\n\n### Details\nThe vulnerable flow is:\n\n1. `IsPossiblyImage(assetPath)` accepts arbitrary `http(s)` URLs without validating that they are safe image URLs.\n2. When an Attribute View card uses `Cover From -> Asset Field`, the application copies `asset.Content` directly into `galleryCard.CoverURL / kanbanCard.CoverURL`.\n3. The front-end renderer inserts `coverURL` directly into `<img src=\"${getCompressURL(item.coverURL)}\">` without escaping quotes or other attribute-breaking characters.\n4. A payload such as `https://example.com/\" onerror=\"require('child_process').exec('calc')` breaks out of the `src` attribute and adds an attacker-controlled `onerror` handler.\nWhen the image fails to load, the injected JavaScript runs in the Electron renderer. Because the desktop app enables `nodeIntegration: true` and disables `contextIsolation` and `webSecurity`, that JavaScript can access Node.js APIs and execute system commands.\n\n### PoC\n1. Install Electron Desktop app.\n2. Create a database / Attribute View with an mAsset column and add at least one row.\n3. Add any legitimate image to that mAsset field so the entry is stored as type image.\n4. Switch the view to Gallery or Kanban.\n5.Set Cover From to Asset Field and choose the mAsset column.\n6. Edit the existing image asset entry and replace its link with the following payload:\n```\nhttps://example.com/\" onerror=\"require('child_process').exec('calc')\n```\n7. Save the change and reopen or refresh the Gallery / Kanban view.\n8. Observe that the rendered HTML contains an injected onerror handler and the Calculator application starts on Windows.\n\nExample rendered output:\n```html\n<img loading=\"lazy\" class=\"av__gallery-img\" src=\"https://example.com/\" onerror=\"require('child_process').exec('calc')\">\n```\n### Impact\nAn attacker can store malicious content in a database asset field and execute arbitrary JavaScript when another user opens the affected Gallery or Kanban view. In the desktop client, that JavaScript has access to Node.js APIs, so the impact is not limited to browser-context XSS. The payload executes OS commands with the victim’s local user privileges, which turns this into remote code execution on the desktop application once the malicious content is delivered and rendered.","format":"markdown","source":"ghsa"},{"lang":"en","text":"SiYuan: Stored XSS in Attribute View Gallery/Kanban Cover Rendering Allows Arbitrary Command Execution in Desktop Client in github.com/siyuan-note/siyuan/kernel.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: github.com/siyuan-note/siyuan/kernel before v3.6.2.","format":"markdown","source":"go"},{"lang":"es","text":"SiYuan es un sistema de gestión de conocimiento personal. Antes de la versión 3.6.2, un atacante que puede colocar una URL maliciosa en un campo 'mAsse' de la vista de atributos puede desencadenar XSS almacenado cuando una víctima abre la vista de Galería o Kanban con 'Cubrir desde  ->  Campo de activo' habilitado. El código vulnerable acepta URLs HTTP(s) arbitrarias sin extensiones como imágenes, almacena la cadena controlada por el atacante en 'coverURL' y la inyecta directamente en un atributo '<img src=\"...\"> sin escapar. En el cliente de escritorio Electron, el JavaScript inyectado se ejecuta con 'nodeIntegration' habilitado y 'contextIsolation' deshabilitado, por lo que el XSS alcanza la ejecución arbitraria de comandos del sistema operativo bajo la cuenta de la víctima. Este problema ha sido parcheado en la versión 3.6.2.","source":"nvd"}],"published":"2026-03-31T21:44:36.504Z","modified":"2026-07-24T21:10:00.143Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","score":9.1,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","score":9,"rating":"CRITICAL"}],"cwes":["CWE-79","CWE-94"],"affected":[{"ranges":[{"version":"< 3.6.2","status":"affected"}],"vendor":"siyuan-note","product":"siyuan","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.6.2"}],"ecosystem":"Go","package":"github.com/siyuan-note/siyuan/kernel","purl":"pkg:golang/github.com/siyuan-note/siyuan/kernel","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/siyuan-note/siyuan/kernel","purl":"pkg:golang/github.com/siyuan-note/siyuan/kernel","source":"go"},{"ranges":[{"status":"affected","fixed":"3.6.2"}],"vendor":"b3log","product":"siyuan","cpe":"cpe:2.3:a:b3log:siyuan:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/siyuan-note/siyuan/security/advisories/GHSA-rx4h-526q-4458","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/siyuan-note/siyuan/issues/17246","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/siyuan-note/siyuan/releases/tag/v3.6.2","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34448","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/siyuan-note/siyuan","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-04-03T16:04:30.231Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-34448","url":"https://www.cve.org/CVERecord?id=CVE-2026-34448","licence":"CVE Terms of Use","modified":"2026-04-03T16:05:31.678Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rx4h-526q-4458","url":"https://github.com/advisories/GHSA-rx4h-526q-4458","licence":"CC-BY-4.0","modified":"2026-06-25T23:11:38.353Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5644","url":"https://pkg.go.dev/vuln/GO-2026-5644","licence":"CC-BY-4.0","modified":"2026-06-25T23:01:23.213Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-34448","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34448","licence":"Public domain","modified":"2026-07-24T21:10:00.143Z"}],"updatedAt":"2026-11-25T22:59:17.645Z","epss":{"score":0.00554,"percentile":0.47631,"date":"2026-12-01T12:00:22.000Z"}}