mcp-cve-project

CVE-2026-59176 | Functype: MCP set_functype_version Package Alias RCE via Unsanitized pnpm install + Dynamic Import | High |

CVE Information

Field Value
CVE / NVD CVE-2026-59176
Date (index) 2026-10-28
Affected product (index) Functype: MCP set_functype_version Package Alias RCE via Unsanitized pnpm install + Dynamic Import
GHSA ID GHSA-wcjj-9m6g-2fr2
OWASP MCP Top 10 (2025) MCP06 — Prompt Injection via Contextual Payloads
Published / disclosed 2026-10-28
Ecosystem Source repository
Component jordanburke/functype
EPSS score 0.002120000 (FIRST EPSS, 2026-11-09)
CVSS score 7.8 HIGH CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CWE CWE-829
Affected versions < 1.4.4
Fixed versions None named in the published CVE record
Fix status No fixed version in the published CVE record
Exploit status Public advisory. This note does not include exploit steps.
Notes Updated on 2026-11-09 from the published CVE record and FIRST EPSS.

CVE Breakdown


What is the vulnerability?

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.

Attack prerequisites / exposure

Depends on deployment. Typical MCP cases are a reachable HTTP or SSE listener, a malicious remote MCP server, a poisoned project configuration, or a person opening attacker-influenced content. Developer workstations and shared runners are high-value when the server runs with host access.

CVE is because of what bug?

The published weakness mapping is CWE-829. Use the linked advisory for the upstream root cause.

MCP-specific impact / why it matters

MCP connects a model to tools, files, and credentials on a host or network. A flaw in transport checks, path checks, command handling, or token binding can become code execution, credential exposure, or access to another user’s session.

Where was the bug? (source + snippet)

File and function names belong in the linked upstream advisory and patch. This index does not repeat exploit inputs.

Fix / Remediation

Apply the vendor’s patched release or commit. Until then, keep the affected MCP listener off untrusted networks and require authentication on HTTP transports.

Upstream fix (open source)

Workarounds / mitigations

Detection / verification