CVE-2026-59176

GHSA-wcjj-9m6g-2fr2 · published 9 Sep 2026 · updated 3 Nov 2026

Functype: MCP set_functype_version Package Alias RCE via Unsanitized pnpm install + Dynamic Import

7.8HighCVSS 7.8EPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in functype-mcp-server 1.4.4.

Functype is a family of TypeScript functional programming libraries. Prior to 1.4.4, the `set_functype_version` MCP tool in `functype-mcp-server` accepts an unconstrained `version` string using only `z.string()` validation in `packages/mcp-server/src/index.ts` and interpolates it into `functype@<version>` for `pnpm add`. Package-alias syntaxes such as `file:`, `npm:`, URLs, or paths can cause an arbitrary local or remote package to be installed as functype. Immediately afterward, `initDocsData(true)` in `packages/mcp-server/src/lib/docs/data.ts` resolves `functype/cli` and dynamically imports the newly installed module, executing attacker-controlled JavaScript with the MCP server process's privileges. Any MCP client able to send a `tools/call` request invoking the tool can exploit the flaw; the tool is enabled by default without authentication in `stdio` mode. A connected AI assistant susceptible to indirect prompt injection can also be induced to invoke it from a malicious document or web page. In non-default `TRANSPORT_TYPE=httpStream` deployments, a network-accessible attacker does not require local access. Successful execution can read process secrets, modify files, or terminate the server. This issue is fixed in `version` 1.4.4.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
jordanburke<1.4.4
npm: functype-mcp-server<1.4.4, <=1.4.31.4.4

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2026-59176 severity on Zeptric[![CVE-2026-59176](https://zeptric.io/badge/cve/CVE-2026-59176.svg)](https://zeptric.io/cve/CVE-2026-59176)