Skip to content

AAK-MCP-SIYUAN-CVE-2026-126393-001: SiYuan image from 3.7.0 below 3.8.10: the MCP skill tool's install download follows a redirect or a rebinding name to internal addresses

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

What it detects

SiYuan (siyuan-note/siyuan), a self-hosted notes app, serves MCP from its own kernel, and the Docker Hub image b3log/siyuan is how it runs on a server. Its skill MCP tool has an install action that takes a URL (an owner/repo shorthand, a GitHub URL, a raw SKILL.md URL or a release zip) and downloads it in the kernel. downloadSkillSource checks the URL's host once, with CheckHostSSRF when the URL is parsed, and fetchBytes then downloads through httpclient.NewBrowserRequest(), which resolves the name again when it connects and follows redirects without checking them, so a public URL that redirects to a loopback, private or metadata address, or a name that re-resolves to one, reaches internal services from the kernel (CVE-2026-126393, CVSS 3.1 6.1, CWE-918, GHSA-6pg3-pqxw-jm82). The advisory notes that install is declared a local write, so an agent steered by injected text needs a confirmation or a pre-approved setting. Checked in the source: kernel/mcp/tools/skill.go with install and kernel/util/skill.go with that fetchBytes ship in v3.7.0-rc.1 (kernel/mcp is absent through v3.6.5) and are unchanged in that respect through v3.8.9; 3e1b977e ("Route skill downloads through the SSRF-safe client", 2026-10-29) downloads through ssrfSafeClient, which dials only the checked address, and checks every redirect, in v3.8.10 and not v3.8.9.

How to fix

Run b3log/siyuan v3.8.10 or later, pinned by version. Until then keep the skill tool's install action behind a confirmation for every MCP client, and block the kernel's egress to loopback, private and cloud metadata addresses.

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

agent-audit-kit scan . --rules AAK-MCP-SIYUAN-CVE-2026-126393-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.7.0 below v3.8.10 are reported, pre-release tags included (v3.7.0-rc.1 reads as 3.7.0); tags below v3.7.0 predate the MCP skill tool and are not. Every v3.8.10 pre-release tag was pushed after the fix, and latest was the v3.8.10 image on 2026-11-14, so an untagged reference is not reported. Tags from v3.7.0 below v3.8.7 also fire AAK-MCP-SIYUAN-CVE-2026-116168-001, and tags from v3.8.0 below v3.8.9 AAK-MCP-SIYUAN-CVE-2026-123492-001, different flaws; v3.8.9 fires this rule alone. The rule reads the tag, not whether any MCP client holds a token for the kernel or may install skills without a confirmation, so a container no agent talks to is reported too. A desktop install, or a kernel built from source, 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-126393-001.md: the page then shows that text, with the registry reference appended under it.