AAK-MCP-ZCODE-CVE-2026-88755-001: ZCode connects the MCP servers a workspace's config declares when the folder is opened, without approval
- Severity
- HIGH
- Category
- Trust Boundaries (
trust-boundary) - Scanner
agent_audit_kit/scanners/mcp_config.py- Auto-fixable
- No.
- SARIF name
ZCodeWorkspaceMcpAutoConnect
What it detects
ZCode, Z.ai's coding agent (a desktop client and a zcode CLI built from one source tree), reads MCP servers from a workspace's zcode.json and .zcode/config.json, under mcp.servers, in every directory from the git root down to the folder it opens, and connects every one at session start without asking. A stdio server's command runs as the user the moment the repository is opened, and each server's tool descriptions enter the agent's context (CVE-2026-88755, CWE-284/CWE-863). ZCode's own configuration guide says workspace servers "were previously untrusted and required manual authorization; they now connect by default like any other scope". NVD names 3.11.2.6792. Checked in the source: 3.14.0 (2026-09-20), 3.14.3 and 3.15.1 (2026-10-10), every published release, keep the set of untrusted project servers empty in runtime-config.ts, under a comment that project-scoped MCP is trusted by default and connects automatically, so there is no fixed release.
How to fix
Read a repository's zcode.json and .zcode/config.json before opening it in ZCode: its guide offers no way to have it ask first. In your own project, keep personal servers in ~/.zcode/cli/config.json rather than the workspace file, or set "enabled": false on a workspace server so ZCode skips it.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-ZCODE-CVE-2026-88755-001
Limitations
Reports each ZCode workspace file once, naming every server ZCode would start; whether a server is hostile is for the MCP config rules, which read the same servers. ZCode ships as desktop installers and an install script, so its version is in no file AAK reads, and every such file with an enabled server is reported, whatever release opens it. A server is not re-checked against ZCode's schema, which drops an entry with an unknown key, so that entry is still named. A file that is not strict JSON is skipped, as ZCode skips it. The desktop client falls back to .agents/mcp.json at the workspace root when .zcode/config.json declares no server; other agents read that file too, and it is not reported here. Of the rules that read a config's MCP servers, only the MCP config rules (AAK-MCP-001 to -007, AAK-MCP-ATTEST-001 and the others of that scanner) and the composition chains (AAK-COMPOSE-*) read the servers under mcp.servers in these two files. The others do not, so a server declared only here is named by this rule and not checked by them: the supply-chain rules (AAK-SUPPLY-001 and -006), the CVE version pins on an npx or uvx launch, tool poisoning (AAK-POISON-*), transport security (AAK-TRANSPORT-*), AAK-SECRET-007 on a server's env (the secret-pattern rules read these files as text, as they read any file), AAK-MCP-STDIO-LAUNCHER-INJECT-001, aak pin and aak verify, and aak sbom.
References
- CVE: CVE-2026-88755
- OWASP MCP Top 10: MCP05:2025 (Command Injection & Execution), MCP09:2025 (Shadow MCP Servers)
- OWASP Agentic Top 10: ASI04 (Agentic Supply Chain Vulnerabilities), ASI05 (Unexpected Code Execution (RCE))
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-TRUST-01 (Auto-Enable All Servers)
- CSA AI Controls Matrix (AICM): IAM-16, 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-ZCODE-CVE-2026-88755-001.md: the page then shows that text, with the registry reference appended under it.