AAK-MCP-KIMICODE-CVE-2026-95660-001: Kimi Code up to 0.31.0 starts a workspace's MCP servers before the trust prompt
- Severity
- MEDIUM
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py- Auto-fixable
- No.
- SARIF name
KimiCodeUntrustedWorkspaceMcpAutostart
What it detects
Kimi Code (@moonshot-ai/kimi-code), Moonshot AI's coding agent CLI, through 0.31.0 loads the MCP configuration of the workspace it is opened in (agent-core-v2/src/agent/mcp/config-loader.ts) and spawns the STDIO servers a repository's .mcp.json declares before asking whether the workspace is trusted, so opening a cloned repository runs commands its author chose (CVE-2026-95660, CVSS 3.1 6.3, CWE-77/CWE-78). 0.31.1 adds the trust prompt and resolves fd and stty to absolute paths, so an untrusted workspace can no longer plant bare-name executables on $PATH before confirmation either.
How to fix
Upgrade @moonshot-ai/kimi-code to >= 0.31.1 and pin it. Until then, do not open untrusted repositories with Kimi Code, and read a repository's .mcp.json before opening it.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-KIMICODE-CVE-2026-95660-001
Limitations
Reports the package where a manifest pins it. Most installs are global (npm i -g) and leave no file in a project, so this catches a project that declares Kimi Code as a dependency, not every machine that runs it. The project-side half of the attack, the .mcp.json a hostile repository ships, is what the MCP config rules read. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.
References
- CVE: CVE-2026-95660
- OWASP MCP Top 10: MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering), MCP09:2025 (Shadow MCP Servers)
- OWASP Agentic Top 10: ASI04 (Agentic Supply Chain Vulnerabilities), ASI09 (Human-Agent Trust Exploitation)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-AUTH-01 (Missing Authentication)
- CSA AI Controls Matrix (AICM): IAM-01, 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-KIMICODE-CVE-2026-95660-001.md: the page then shows that text, with the registry reference appended under it.