Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain document edit permission
-
DeliveryStore javascript: href in math block
-
ExploitKaTeX renders link with trust:true via innerHTML
-
ExecutionVictim opens document and clicks link
-
ImpactScript executes in application origin
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an attacker who already holds edit permission on the target document (collaborator/insider) in a workspace where that document is read by others; the payload can be planted via the normal editor or the documented API (POST /api/block/appendBlock with a markdown math block). KaTeX must be in its default trust:true mode on the local-kernel editor path - the condition the advisory names explicitly. Exploitation is further limited by mandatory user interaction: a victim must open the document AND click the rendered link, because javascript: URLs execute only on an in-document click gesture (no click, no execution). Affected: SiYuan 2.10.0 up to (not including) 3.8.7. Not triggered by \script, <img onerror>, HTML blocks, or iframe src (those are escaped/neutralized by Lute); specific to \href/\url/\includegraphics in math blocks, including mixed-case schemes like JaVaScRiPt:. |
| Impact | This is a genuine but moderate-priority issue, not a high-CVSS-but-low-real-risk false alarm, and conversely not an emergency. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:P, base 5.1 MEDIUM) and the vuln.today Decision label 'this_month' agree on a measured timeline rather than act_now/emergency. Two signals meaningfully constrain real-world risk: PR:L means the attacker must already hold edit permission on the target document (an insider or invited collaborator, not an anonymous internet attacker), and UI:P means a victim must actively click the rendered link - javascript: URLs fire only on an in-document click gesture, so a merely-viewed document is not exploited. The impact metrics push all vulnerable-system impacts to none (VC:N/VI:N/VA:N) and place the real effect on the subsequent system (SC:L/SI:L) - i.e. script execution in the browser/application origin, not compromise of the SiYuan kernel itself. There is no CISA KEV listing (not actively exploited) and no EPSS score was supplied, so widespread opportunistic exploitation cannot be inferred; the threat model is a malicious or compromised collaborator in a shared/multi-reader workspace. A detailed, reproduced PoC does exist (see exploitation status below), which raises practical exploitability above a theoretical finding. Net: patch on a normal cadence; prioritize sooner only for deployments where documents are shared across semi-trusted users. |
| Exploit ScenarioDerived | A collaborator holding edit permission on a shared SiYuan document stores a math block such as $$\href{javascript:alert('xss')}{clickme}$$, which Lute saves verbatim and mathRender later renders with KaTeX trust:true, producing an <a href="javascript:..."> assigned via innerHTML. When another reader opens the document and clicks the rendered 'clickme' link, the attacker's script runs in the application origin and can act with that reader's session against the local kernel APIs. The GHSA advisory documents a working PoC reproduced end-to-end in a real Chromium against a running SiYuan 3.8.5 instance; exploitation requires the single victim click (AC:L/AT:N but UI:P). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 25, 2026
Stored cross-site scripting in SiYuan Note 2.10.0 through 3.8.6 lets a user who already holds edit permission on a document plant a javascript: URL inside math-block content, for example $$\href{javascript:alert('xss')}{clickme}$$, so that script runs in the application origin when a reader clicks the rendered link. The rendering path passes math TeX to KaTeX with trust: true and mounts the resulting HTML through innerHTML, so \href, \url and \includegraphics payloads (including mixed-case JaVaScRiPt: schemes) survive unsanitized. Exploitation is not unauthenticated and is not automatic: the attacker needs writer access to a shared document and the victim must open it and click, which caps practical severity at CVSS 5.1; the vendor advisory GHSA-hhvq-jqv9-pgjq includes a detailed proof-of-concept reproduction against a real Chromium instance, though no CISA KEV listing or public weaponized exploit is reported, and the priority label is this_month.
RemediationAI
Vendor-released patch: upgrade to SiYuan 3.8.7 or later, which is the fixed release named in the package metadata and GHSA-hhvq-jqv9-pgjq (https://github.com/siyuan-note/siyuan/security/advisories/GHSA-hhvq-jqv9-pgjq); the VulnCheck advisory at https://www.vulncheck.com/advisories/siyuan-2.10.0-before-3.8.7-stored-xss-via-katex-href-in-math-blocks covers the same range. Because the payload can only be planted by a principal that already holds edit permission, the practical interim control is to review and prune write access on documents shared with other readers, and to treat math blocks authored by collaborators as untrusted content until the upgrade is applied - the trade-off is reduced collaboration on those documents. The rendering path offers no documented runtime switch for this; turning off KaTeX trust on the local renderer would remove the vector described in the advisory but is not published by the vendor as a supported configuration, and hardening of HTML blocks or iframes would not help since Lute already neutralizes those. Cleaning the stored payload alone is insufficient without the upgrade, since new math blocks can be written through the normal editor or via POST /api/block/appendBlock.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is a CWE-79 injection rooted in a trust decision, not in KaTeX itself. SiYuan stores math-block content verbatim inside a block's data-content attribute via its Lute markdown engine, and app/src/protyle/render/mathRender.ts calls katex.renderToString(Lute.UnEscapeHTMLStr(dataContent), { trust: security.trust, ... }) with KaTeX 0.16.9. KaTeX's \href rule is documented to emit the URL as supplied whenever trust is enabled; the trust/sanitize decision lives in mathRenderSecurity.ts and resolves to trust: true on the local-kernel editor path. The generated markup is then assigned with mathElement.innerHTML = mathHTML, giving a direct DOM HTML sink. Because a javascript: URL in an anchor or image src only fires on an in-document user gesture, the payload is inert until a reader clicks. The advisory explicitly distinguishes what is not exploitable on the same build: paragraph <img onerror=...> is stored escaped, <script> is escaped by Lute, fenced code blocks render as text nodes, HTML block data-content is entity-encoded, and iframe[src="javascript:..."] is emptied by Lute. The residual risk concentrates on the desktop build, whose UI drives local kernel APIs from the same origin the script reaches.
Know when Siyuan gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
PR:L because edit permission is required; UI:R for the mandatory victim click; S:C and C:L/I:L because stored TeX in the kernel executes script in the separate browser/app origin with no direct kernel impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
SQL injection in SiYuan's fullTextSearchAssetContent endpoint lets unauthenticated attackers and holders of publish Role
Stored cross-site scripting in SiYuan personal knowledge management before 3.7.0 lets an attacker with write access to a
SQL injection in SiYuan personal knowledge management (versions <= v3.7.2) lets attackers pass arbitrary SQL statements
Stored cross-site scripting in SiYuan's attribute-view (database) cell renderer, affecting all versions prior to 3.7.0,
SQL injection in SiYuan personal knowledge-management software (all versions before v3.7.3) lets attackers inject arbitr
A SQL injection vulnerability was discovered in Siyuan 3.1.11 in /getHistoryItems. Rated critical severity (CVSS 9.8), t
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the ids array parameter in /batchGetBlockAttrs. R
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the id parameter at /getAssetContent. Rated criti
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the notebook parameter in /searchHistory. Rated c
SiYuan personal knowledge management system prior to 3.5.4 has a stored XSS vulnerability (CVSS 9.6) that allows code ex
Remote code execution in SiYuan note-taking application (before v3.6.1) allows any malicious Bazaar marketplace package
Origin-validation bypass in SiYuan Note (open-source personal knowledge management) before 3.7.0 lets any installed Chro
EUVD-2026-109430
GHSA-mqcm-q7hm-v37p
NVD
CVE.org
EPSS
Exploit-DB