{"schema":"threatline.record/2","record":{"id":"CVE-2026-59176","aliases":["GHSA-wcjj-9m6g-2fr2"],"summary":"Functype: MCP set_functype_version Package Alias RCE via Unsanitized pnpm install + Dynamic Import","details":"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.","categories":["Libraries & packages"],"product":"functype","vendor":"jordanburke","ecosystem":"npm","affected_ranges":[{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-59176","source_modified_at":"2026-10-28T13:08:52.592Z","fetched_at":"2026-10-28T15:55:58.673066Z","product":"functype","vendor":"jordanburke","versions":[{"version":"< 1.4.4","status":"affected"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-wcjj-9m6g-2fr2","source_modified_at":"2026-09-10T00:10:58.043098Z","fetched_at":"2026-10-28T15:55:58.673066Z","package":{"name":"functype-mcp-server","ecosystem":"npm","purl":"pkg:npm/functype-mcp-server"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.4.4"}]}],"versions":[]}],"fixed_versions":[{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-wcjj-9m6g-2fr2","source_modified_at":"2026-09-10T00:10:58.043098Z","fetched_at":"2026-10-28T15:55:58.673066Z","package":{"name":"functype-mcp-server","ecosystem":"npm","purl":"pkg:npm/functype-mcp-server"},"version":"1.4.4"}],"cvss":7.8,"severity":"High","kev":{"listed":false},"epss":{"probability":null,"percentile":null,"score_date":null},"published_at":"2026-10-28T13:08:52.592Z","modified_at":"2026-10-28T13:08:52.592Z","provenance":[{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-59176","fetched_at":"2026-10-28T15:55:58.673066Z","source_modified_at":"2026-10-28T13:08:52.592Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-wcjj-9m6g-2fr2","fetched_at":"2026-10-28T15:55:58.673066Z","source_modified_at":"2026-09-10T00:10:58.043098Z"}],"sources":["CVE List","OSV"],"references":[{"source":"CVE List","url":"https://github.com/jordanburke/functype/security/advisories/GHSA-wcjj-9m6g-2fr2","tags":["x_refsource_CONFIRM"]},{"source":"CVE List","url":"https://github.com/jordanburke/functype/commit/c0d58ad9c2a7d15c6117bd3adbbd75de37317dcf","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/jordanburke/functype/releases/tag/v1.4.4","tags":["x_refsource_MISC"]}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","cvss_source":"CVE List","classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-28T13:08:52.592Z","content_hash":"62b047f6837ab6de896e2ddb1b081a0168aaee0fe15b6a57b15ab857995f0489"}}
