CVE-2026-59176: Functype - Command Injection
- Cve: CVE-2026-59176
- Name: Functype - Command Injection
- 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.
- Impact: Attackers can execute arbitrary code with MCP server privileges, read secrets, modify files, or terminate the server.
- Remediation: Update to version 1.4.4 or later.
- Vulnerability type: command_injection
- Vulnerability impact: remote_code_execution, file_system_write, information_disclosure, denial_of_service
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 7.8
- Cvss vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Epss score: 0.00291
- Epss percentile: 0.21931
- Assignee: [email protected]
- Published at: 2026-10-28T14:17:04Z
- Age in days: 27
- Modified at: 2026-11-03T13:17:22Z
- References total: 3
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-59176
- Nvd status: deferred
- Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, products total, products, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-829 | Inclusion of Functionality from Untrusted Control Sphere |
References
Same in every row:
- Source: nvd
- Tags:
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| jordanburke/functype | commit, fix, package, releases, security_advisory | yes | /v1/repositories/jordanburke/functype |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts