High, CVSS 7.8npmAmendedPublished
functype-mcp-server: MCP set_functype_version Package Alias RCE via Unsanitized pnpm install + Dynamic Import
CVE-2026-59176 · GHSA-wcjj-9m6g-2fr2
- Affected
- npm functype-mcp-server < 1.4.4
- Fixed in
- 1.4.4· Vendor fix available
- Issue
- MCP `set_functype_version` Package Alias RCE via Unsanitized pnpm install + Dynamic Import Summary The `set_functype_version` MCP tool in `functype-mcp-server` accepts an unconstrained `version` string, interpolates it directly into an npm package specifier (`functype@ `), and installs it via `pnpm add` without any validation. Because npm/pnpm package specifiers support `file:`, `npm:`, and other alias syntaxes, an attacker who can send an MCP `tools/call` request to this tool can cause the server to install an arbitrary local or remote package as `functype`. Immediately after installation, the server calls `initDocsData(true)`, which dynamically imports `functype/cli` from the newly installed location, executing attacker-controlled JavaScript in the MCP server process. This results in full Remote Code Execution (RCE) with the privileges of the server process — full confidentiality, integrity, and availability impact (CVSS 7.8 High). Details The vulnerable code is in…
Recommended action: Upgrade to 1.4.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.