AAK-MCP-FUNCTYPE-CVE-2026-59176-001: functype-mcp-server below 1.4.4: set_functype_version installs and imports any package
- Severity
- HIGH
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py- Auto-fixable
- No.
- SARIF name
FunctypeMcpVersionAliasInstall
What it detects
functype-mcp-server (npm, jordanburke/functype) has a set_functype_version tool, on by default, that takes any string, runs pnpm add functype@<version> and then imports functype/cli from what it installed. A file:, npm:, URL or path alias in the version installs another package under the name functype, so a client or a prompt-injected agent runs its JavaScript in the server's process (CVE-2026-59176, CVSS 7.8, CWE-829; GHSA-wcjj-9m6g-2fr2). Checked in the published npm packages: 0.47.0, the first release, to 1.4.3 pass the string as given, and 1.4.4 refuses alias syntax and installs with --ignore-scripts.
How to fix
Upgrade functype-mcp-server to 1.4.4 or later and pin it. Until then, keep the server away from agents that read untrusted content, and do not run it with TRANSPORT_TYPE=httpStream on a reachable address.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-FUNCTYPE-CVE-2026-59176-001
Limitations
Reports functype-mcp-server below 1.4.4 where a version is stated: a package.json or lockfile entry, or the package an npx launch in an MCP config names, reporting a range that admits an affected version. latest was 1.26.0 on 2026-11-11 and states no version, so the README's own npx functype-mcp-server is not reported. The functype library itself is not affected and not matched. 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-59176
- OWASP MCP Top 10: MCP05:2025 (Command Injection & Execution), MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering)
- OWASP Agentic Top 10: ASI04 (Agentic Supply Chain Vulnerabilities), ASI05 (Unexpected Code Execution (RCE))
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-INJECT-01 (Shell Injection via MCP)
- CSA AI Controls Matrix (AICM): AIS-07, 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-FUNCTYPE-CVE-2026-59176-001.md: the page then shows that text, with the registry reference appended under it.