CVE-2026-59176
Functype: MCP set_functype_version Package Alias RCE via Unsanitized pnpm install + Dynamic Import
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.
Fixes and workarounds
Fix
functype-mcp-server (npm): OSV reports a fixed version 1.4.4. Check the advisory for supported release branches.
Source: OSV GHSA-wcjj-9m6g-2fr2Affected products and versions
| Product | Versions | Authority |
|---|---|---|
| functype jordanburke |
< 1.4.4 (affected) | CNA: GitHub_M |
functype-mcp-serverfunctype-mcp-server
npm |
≥ 0; < 1.4.4 (affected, semver); OSV events: introduced 0; fixed 1.4.4Source events (semver)
Other versions: unaffected |
OSV GHSA-wcjj-9m6g-2fr2 |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 3.1 / 7.8 high |
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | CNA: GitHub_M |
Exploit evidence
- https://github.com/jordanburke/functype/security/advisories/GHSA-wcjj-9m6g-2fr2
exploit · ADP: CISA-ADP
References
- https://github.com/jordanburke/functype/security/advisories/GHSA-wcjj-9m6g-2fr2CNA: GitHub_M · x_refsource_CONFIRM
- https://github.com/jordanburke/functype/commit/c0d58ad9c2a7d15c6117bd3adbbd75de37317dcfCNA: GitHub_M · x_refsource_MISC
- https://github.com/jordanburke/functype/releases/tag/v1.4.4CNA: GitHub_M · x_refsource_MISC
- https://github.com/jordanburke/functype/security/advisories/GHSA-wcjj-9m6g-2fr2ADP: CISA-ADP · exploit
- https://github.com/advisories/GHSA-wcjj-9m6g-2fr2OSV / GitHub Security Advisories · advisory
- https://osv.dev/vulnerability/GHSA-wcjj-9m6g-2fr2OSV / GitHub Security Advisories · osv
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.