---
id: "CVE-2026-116169"
kind: "vulnerability"
aliases: ["CVE-2026-116169"]
title: "SiYuan: stored XSS in math blocks runs script on link click"
severity: "medium"
cvss: 5.4
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["multi-user", "package", "self-hosted", "siyuan"]
not_affected_if: ["single-user", "version-3.8.7-or-later"]
published_at: "2026-10-25T14:16:56+00:00"
first_seen_at: "2026-10-25T14:41:23+00:00"
updated_at: "2026-10-25T14:42:59+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116169", "first_seen_at": "2026-10-25T14:41:23+00:00"}]
---

# SiYuan: stored XSS in math blocks runs script on link click

SiYuan notes from 2.10.0 before 3.8.7 let a user with edit permission store javascript: URLs inside math blocks, which KaTeX renders with trust enabled. When another reader clicks the rendered link, the script runs in the SiYuan application origin.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed SiYuan version in the app's About dialog or package metadata; versions from `2.10.0` up to but not including `3.8.7` are affected.
- Look for math blocks containing `\href`, `\url` or `\includegraphics` with `javascript:` targets in notes that untrusted editors can write to.

## Fix

- Upgrade SiYuan to `3.8.7` or later.
- Until upgraded, restrict edit permission on workspaces to trusted users.

## Timeline

- 2026-10-25T14:41:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116169

## From the sources

SiYuan from 2.10.0 before 3.8.7 contains a stored cross-site scripting vulnerability that allows users with edit permission to inject script by placing javascript: URLs in math block content rendered with KaTeX trust enabled. Attackers can store \href, \url, or \includegraphics payloads that mathRender assigns via innerHTML, executing script in the application origin when a reader clicks the rendered link.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
