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

- Severity: High 7.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 10% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-09-09T23:49:20.000Z
- Modified: 2026-11-03T13:17:22.923Z
- Also known as: GHSA-wcjj-9m6g-2fr2
- Weaknesses: CWE-829
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- jordanburke functype: < 1.4.4
- functype-mcp-server (npm): before 1.4.4

## Every score

- GitHub_M: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/jordanburke/functype/security/advisories/GHSA-wcjj-9m6g-2fr2> (exploit, web)
- <https://github.com/jordanburke/functype/commit/c0d58ad9c2a7d15c6117bd3adbbd75de37317dcf> (web)
- <https://github.com/jordanburke/functype/releases/tag/v1.4.4> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-59176> (advisory)
- <https://github.com/jordanburke/functype> (package)

## Sources

- CVE List: [CVE-2026-59176](https://www.cve.org/CVERecord?id=CVE-2026-59176), CVE Terms of Use, modified 2026-11-03
- GitHub Advisory Database: [GHSA-wcjj-9m6g-2fr2](https://github.com/advisories/GHSA-wcjj-9m6g-2fr2), CC-BY-4.0, modified 2026-11-02
- NVD: [CVE-2026-59176](https://nvd.nist.gov/vuln/detail/CVE-2026-59176), Public domain, modified 2026-11-03

---

Page: https://cve.day/CVE-2026-59176 · Whole record: https://cve.day/CVE-2026-59176.json · Rebuilt by cve.day 2026-11-25T22:59:47.617Z
