CVE-2026-66012: SiYuan before v3.7.2 Unauthenticated Administrator Takeover via MCP
SiYuan before v3.7.2 contains a missing authorization vulnerability in the POST /mcp kernel endpoint, which is gated only by a general auth check (model.CheckAuth) with no admin-role or read-only enforcement. This exposes 31 MCP tools, including a file tool with list/read/write/delete/rename/copy actions across the entire workspace. When the Publish server is enabled in anonymous mode (Conf.Publish.Enable=true and Conf.Publish.Auth.Enable=false), the Publish reverse proxy attaches an anonymous RoleReader JWT to proxied requests, allowing a remote unauthenticated attacker to reach /mcp. The attacker can read conf/conf.json to extract accessAuthCode, api.token, and cookieKey in plaintext, write arbitrary files in the workspace, and plant a plugin into data/plugins/ that executes with nodeIntegration:true and no contextIsolation on the next desktop launch, leading to administrator takeover.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
SiYuanto a version that resolves this vulnerability.Fixed in 3.7.2 - Configuration
Disable anonymous Publish mode by ensuring Conf.Publish.Auth.Enable is set to true (material states vulnerability occurs when Conf.Publish.Auth.Enable=false in anonymous mode).
SiYuan Publish server Conf.Publish.Auth.Enable = false - Configuration
Disable the Publish server in anonymous mode by ensuring Conf.Publish.Enable is false when Conf.Publish.Auth.Enable=false (material states unauthenticated access to /mcp is possible with Conf.Publish.Enable=true and Conf.Publish.Auth.Enable=false).
SiYuan Publish server Conf.Publish.Enable = false - Compensating control
If the Publish reverse proxy must remain enabled, restrict access to the endpoint that proxies /mcp so that unauthenticated internet clients cannot reach /mcp (the material states an unauthenticated attacker can reach /mcp when anonymous Publish mode is enabled).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-66012?
CVE-2026-66012 has a critical severity rating of 10.
How do I fix CVE-2026-66012?
To mitigate CVE-2026-66012, update SiYuan to version 3.7.2 or later.
What type of vulnerability is CVE-2026-66012?
CVE-2026-66012 is an unauthenticated administrator takeover vulnerability.
What components are affected by CVE-2026-66012?
CVE-2026-66012 affects the MCP kernel endpoint and exposes 31 MCP tools.
What impact can CVE-2026-66012 have on my system?
CVE-2026-66012 allows an attacker to gain unauthorized admin control over the SiYuan application.