Skip to content

AAK-MCP-SIYUAN-CVE-2026-123492-001: SiYuan image 3.8.0 to 3.8.8: an MCP resources/read of a missing resource crashes the kernel

Severity
MEDIUM
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/container_image_pins.py
Auto-fixable
No.
SARIF name
SiyuanMcpResourceReadNilPanic

What it detects

SiYuan (siyuan-note/siyuan), a self-hosted notes app whose kernel serves MCP, ships its server as the Docker Hub image b3log/siyuan. From 3.8.0 the kernel's privateCacheMiddleware sets a cache scope on each MCP result without checking the error or the pointer, and the Go MCP SDK answers resources/read of an unregistered URI with a nil *ReadResourceResult and an error, so a holder of a valid API token who reads a missing resource in an initialized session panics the kernel and stops it (CVE-2026-123492, CVSS 3.1 4.9, CWE-476, GHSA-2x3p-x74g-442x). Checked in the source: kernel/mcp/server.go has no such middleware at v3.7.3; v3.8.0 adds it, unchanged through v3.8.8, over go-sdk 1.7.0 and then 1.8.0, which both return that typed nil; a8b6dd77 ("Prevent nil result panics in MCP cache middleware", 2026-10-22) returns on an error and checks the pointer, in v3.8.9 and not v3.8.8.

How to fix

Run b3log/siyuan v3.8.9 or later, pinned by version. Until then give MCP clients an API token only where a kernel restart is acceptable, and keep a restart policy on the container.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-SIYUAN-CVE-2026-123492-001

Limitations

Reads image references only: an image: value or any other mention of b3log/siyuan:TAG in YAML (compose files, Kubernetes manifests, MCP configs), a Helm values mapping of repository and tag, Dockerfile and Containerfile FROM, and docker run arguments in *mcp*.json and claude_desktop_config.json. Tags from v3.8.0 below v3.8.9 are reported, the v3.8.8 alphas and betas among them. v3.8.9-alpha.1 to alpha.3 were pushed before the fix but read as 3.8.9, so they are not reported; alpha.4 and later carry it. latest was the v3.8.10 digest on 2026-11-11, so an untagged reference is not reported. Tags from v3.8.0 below v3.8.7 also fire AAK-MCP-SIYUAN-CVE-2026-116168-001, a different flaw. The desktop app states no version AAK reads, and npm's and PyPI's siyuan are other projects. docker.io/b3log/siyuan and mirrors under another registry are not matched, and commented-out lines are skipped.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-SIYUAN-CVE-2026-123492-001.md: the page then shows that text, with the registry reference appended under it.