Code execution in Functype MCP server via unvalidated package version
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-829.
Summary
The functype package and functype-mcp-server package before 1.4.4 accept an unconstrained version string in the set_functype_version MCP tool. Package alias syntaxes such as file: or npm: let an attacker install an arbitrary package, which the server then imports, executing attacker-controlled JavaScript with the server's privileges (CWE-829). Any MCP client that can send a tools/call request can trigger it, because the tool is enabled by default without authentication in stdio mode. A connected AI assistant can also be induced to invoke it through indirect prompt injection.
Written with Claude Haiku 5.5 from the sources below · 2026-11-03
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| jordanburke | functype | before 1.4.4 | 1.4.4 | Patch available | CNA |
| — | functype-mcp-server (npm) | before 1.4.4 | 1.4.4 | Patch available | GHSA-wcjj-9m6g-2fr2 |
- functype Vendorjordanburke Affected before 1.4.4 Fixed in 1.4.4 Patch available CNA
- functype-mcp-server (npm) Vendor— Affected before 1.4.4 Fixed in 1.4.4 Patch available GHSA-wcjj-9m6g-2fr2
Remediation
Upgrade functype and functype-mcp-server to version 1.4.4.
Written with Claude Haiku 5.5 from the sources below · 2026-11-03
- Fix · CNA functype (jordanburke) Fixed in 1.4.4
- Fix · GHSA-wcjj-9m6g-2fr2 functype-mcp-server (npm) Fixed in 1.4.4 Advisory →
Timeline
- 2026-10-28 Threatist record created from CVE-2026-59176
- 2026-10-30 Priority changed: MEDIUM → LOW
- 2026-11-02 Alias added: GHSA-wcjj-9m6g-2fr2
- 2026-11-02 2 new references · GHSA-wcjj-9m6g-2fr2
- 2026-11-03 CISA SSVC decision points changed
- 2026-11-03 Priority changed: LOW → HIGH
References
Sources
- CVE-2026-59176 · CVE Program
- CVE-2026-59176 · NVD
- FIRST EPSS
- GHSA-wcjj-9m6g-2fr2 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences