SiYuan's paste bug is rated critical, and 3.9.0 isn't out. Safe mode is the stopgap
Watch, if you use the SiYuan desktop app on 3.8.12. Two advisories published 25 Nov say a pasted JavaScript query embed could run its code in the app's renderer. Both fixes are slated for 3.9.0, which has no stable release yet, so Safe Mode is what you have until it ships.
The line the first advisory turns on: pasting a JavaScript query embed from the clipboard "could cause its code to run in the local desktop renderer without a separate action to run it." The advisory is titled "Web-Forged Clipboard Query Embed Executes in SiYuan's Node-Enabled Renderer", and GitHub rates it critical, CVSS 3.1 9.6. The only user interaction it needs is the paste.
About four hours later a second advisory, rated high (8.1), followed up on the first: untrusted clipboard content "could be saved as a JavaScript query embed and run with the renderer's privileges when the document is opened." So the risk is not only at paste time. A note that already holds such an embed can run it later. The fix makes SiYuan save the pasted source as an ordinary code block.
Both advisories name 3.9.0 as the fixed version. On 25 Nov that exists only as a prerelease, 3.9.0-alpha.1. The latest stable release is 3.8.12, out 24 Nov. The maintainers' stopgap: "start SiYuan in safe mode before opening documents that may contain untrusted pasted content. Safe mode disables JavaScript query embeds." A third advisory the same day, rated medium, covers XLSX attachments that could use enough memory during indexing to affect the kernel. It is also slated for 3.9.0.
SiYuan is a self-hosted knowledge workspace, AGPL-3.0, on GitHub since 2020.
We read the three advisories and the 3.9.0-alpha.1 release, and confirmed that the second fix's commit is in the alpha's history, checked 25 Nov, 15:45 UTC. We did not test either bug or fix, and did not check whether the alpha also carries the first fix.