Advisory

GHSA-8q5w-mmxf-48jg

Details, part 2 of 2. The advisory

Details

python3 poc.py

Steps to reproduce:

  1. git clone https://github.com/siyuan-note/siyuan /tmp/siyuan_test
  2. cd /tmp/siyuan_test && git checkout b382f50e1880ed996364509de5a10a72d7409428~1
  3. python3 poc.py (or go run poc.go if Go PoC)

Expected output:

VULNERABILITY CONFIRMED
Iframe tags with srcdoc attributes bypass the Lute sanitizer, allowing embedded scripts to execute in the Electron context.

Impact

A malicious bazaar package author can include <iframe srcdoc='<script>...</script>'> in their README.md. When other users view the package in SiYuan's marketplace UI, the XSS executes in the Electron context with full application privileges, enabling data theft, local file access, and arbitrary code execution on the user's machine.

Suggested Remediation

  1. Add iframe to the setOfElementsToSkipContent set in the Lute sanitizer.
  2. If iframes must be preserved, strip the srcdoc attribute entirely or sanitize its HTML content recursively.
  3. Apply a Content Security Policy (CSP) to the README rendering context.

References

  • Incomplete fix commit: https://github.com/siyuan-note/siyuan/commit/b382f50e1880ed996364509de5a10a72d7409428
  • Original CVE: CVE-2026-33066

Sources & licences