{"id":"CVE-2026-59176","aliases":[],"cve":{"records":[{"id":"CVE-2026-59176","source":"GitHub_M","state":"PUBLISHED","reasons":[],"replacements":[],"disputed":false,"unsupportedWhenAssigned":false,"reserved":"2026-07-02T19:53:48.829Z","published":"2026-10-28T13:08:52.592Z","modified":"2026-10-28T13:08:52.592Z"}],"publishers":[{"name":"GitHub_M","role":"CNA","organizationId":"a0819718-46f1-4df5-94e2-005712e83aaa","modified":"2026-10-28T13:08:52.592Z"}],"references":[{"url":"https://github.com/jordanburke/functype/security/advisories/GHSA-wcjj-9m6g-2fr2","tags":["x_refsource_CONFIRM"],"source":"GitHub_M"},{"url":"https://github.com/jordanburke/functype/commit/c0d58ad9c2a7d15c6117bd3adbbd75de37317dcf","tags":["x_refsource_MISC"],"source":"GitHub_M"},{"url":"https://github.com/jordanburke/functype/releases/tag/v1.4.4","tags":["x_refsource_MISC"],"source":"GitHub_M"}],"weaknesses":[{"id":"CWE-829","description":"CWE-829: Inclusion of Functionality from Untrusted Control Sphere","source":"GitHub_M"}],"applicability":[],"prioritization":[]},"title":"Functype: MCP set_functype_version Package Alias RCE via Unsanitized pnpm install + Dynamic Import","titleSource":"GitHub_M","descriptionSource":"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.","score":7.8,"severity":"high","published":"2026-10-28T13:08:52.592Z","modified":"2026-10-28T13:08:52.592Z","withdrawn":false,"knownExploited":false,"affected":[],"products":[{"vendor":"jordanburke","name":"functype","platforms":[],"versions":[{"version":"< 1.4.4","status":"affected"}],"cpes":[],"source":"GitHub_M","url":"https://www.cve.org/CVERecord?id=CVE-2026-59176"}],"remediation":[],"references":["https://github.com/jordanburke/functype/security/advisories/GHSA-wcjj-9m6g-2fr2","https://github.com/jordanburke/functype/commit/c0d58ad9c2a7d15c6117bd3adbbd75de37317dcf","https://github.com/jordanburke/functype/releases/tag/v1.4.4"],"sources":[{"name":"CVE","id":"CVE-2026-59176","modified":"2026-10-28T13:08:52.592Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-59176"}],"assessments":[{"source":"GitHub_M","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8}],"sourceAffected":[],"observedAt":"2026-10-29T14:40:50.243Z","kev":{"status":"not-listed","checkedAt":"2026-10-31T16:30:35.111Z"},"coverage":[{"source":"NVD","status":"no-result","checkedAt":"2026-10-28T14:10:30.668Z","attemptedAt":"2026-10-28T14:10:30.668Z"},{"source":"GHSA","status":"available","checkedAt":"2026-10-28T14:10:30.668Z","attemptedAt":"2026-10-28T14:10:30.668Z"},{"source":"EUVD","status":"available","checkedAt":"2026-10-28T14:10:30.797Z","attemptedAt":"2026-10-28T14:10:30.797Z"},{"source":"EPSS","status":"no-result","checkedAt":"2026-10-28T14:10:30.665Z","attemptedAt":"2026-10-28T14:10:30.665Z"}],"evidence":[{"source":"GitHub Advisory Database","id":"GHSA-wcjj-9m6g-2fr2","url":"https://github.com/advisories/GHSA-wcjj-9m6g-2fr2","modified":"2026-09-09T23:49:21Z","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","checkedAt":"2026-10-28T14:10:30.668Z"},{"source":"ENISA EUVD","id":"EUVD-2026-112078","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-112078","modified":"Sep 9, 2026, 11:49:20 PM","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","checkedAt":"2026-10-28T14:10:30.797Z"}],"aiSummary":{"text":"Functype versions prior to 1.4.4 are affected by a vulnerability where an attacker with access to send a `tools/call` request can execute arbitrary JavaScript. The weakness is due to unsanitized input in the `set_functype_version` tool. This can lead to reading process secrets, modifying files, or terminating the server.","model":"@cf/meta/llama-3.3-70b-instruct-fp8-fast","generatedAt":"2026-10-30T09:43:00.963Z","sources":[{"name":"CVE","url":"https://www.cve.org/CVERecord?id=CVE-2026-59176"}]}}