AAK-MCP-SIYUAN-CVE-2026-116168-001: SiYuan image from 3.7.0 below 3.8.7: the MCP asset tool copies .env files into the workspace, where /assets/ serves them back
- Severity
- MEDIUM
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/container_image_pins.py- Auto-fixable
- No.
- SARIF name
SiyuanMcpAssetUploadSecretFileRead
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 asset MCP tool has an upload action that copies local files into the workspace, and the kernel serves workspace assets back over HTTP at /assets/. The action shipped in 3.7.0 reading any absolute path (GHSA-p23f-cm6q-2qp8, fixed in 3.8.1), and 3.8.1 checks paths against a sensitive-path list that leaves out .env and other secret files, so through 3.8.6 a client holding an API token could have a .env from the server user's home copied into the workspace and read it back (CVE-2026-116168, CVSS 3.1 6.2, CWE-22, GHSA-q768-4j87-gf3w). 3.8.7 adds .env, matched as a prefix so .env.local too, macOS Library and Windows AppData to the list.
How to fix
Run b3log/siyuan v3.8.7 or later, pinned by version. 3.8.7 still checks names against a list, so keep credential files out of the home directory of the user SiYuan runs as, and give MCP clients a token only on a workspace they may read in full.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-SIYUAN-CVE-2026-116168-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.7 are reported, pre-release tags included (v3.7.0-rc.1 reads as 3.7.0); tags below v3.7.0 predate the MCP asset tool and are not. Every pre-release tag that reads as 3.8.7 or later was pushed after the fix, and latest was the v3.8.8 image on 2026-10-26, so an untagged reference is not reported. The rule reads the tag, not whether any MCP client holds a token for the kernel, 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
- CVE: CVE-2026-116168
- OWASP MCP Top 10: MCP01:2025 (Token Mismanagement & Secret Exposure), MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering)
- OWASP Agentic Top 10: ASI02 (Tool Misuse and Exploitation), ASI04 (Agentic Supply Chain Vulnerabilities)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-INJECT-06 (Tool Param Path Traversal)
- CSA AI Controls Matrix (AICM): AIS-07, DSP-17, STA-08
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-116168-001.md: the page then shows that text, with the registry reference appended under it.