/

CVE-2026-67546

Severity:

HIGH RISK

(8.8)

Command Injection (CWE-94) in Heym MCP Fetch Tools

CVE-2026-67546

Deferred

Vulnerability type

Category:

Code Injection / Command Execution

CWE:

CWE-94

Impact:

Attacker-Controlled Command Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Heym's MCP fetch-tools endpoint can start a process using a command and arguments supplied by an authenticated user, including users with the lowest role. Because the process runs on the shared backend before MCP protocol validation, it may cause side effects even if it does not return valid MCP data.

Affected context

The issue affects Heym deployments before version 0.0.75 when the shared backend exposes POST /api/mcp/fetch-tools and accepts the stdio transport. In this path, the endpoint starts the supplied process with attacker-controlled command arguments and an environment merged over os.environ. MCP protocol validation happens after the process has run, so rejecting its response does not prevent execution or side effects.

Exploit preconditions

  • Attack surface: The authenticated POST /api/mcp/fetch-tools endpoint with stdio transport enabled
  • Required access: An authenticated Heym account; the described behavior is available to users with the lowest role
  • Trigger point: The backend handles a fetch-tools request that supplies a stdio process configuration
  • Why exploitation is possible: The backend starts the attacker-supplied command before validating whether the process speaks MCP

Why this happens

The endpoint allows a low-privilege user to influence a process launched by the shared backend, including its command and arguments. Starting attacker-controlled behavior before authorization or trust-boundary checks is an unsafe code-execution pattern associated here with CWE-94: Improper Control of Generation of Code. Later MCP protocol validation does not undo effects that occur during process execution.

Potential impact

  • An attacker may execute commands with the backend process's permissions.
  • The process could access or alter data available to the shared backend.
  • A compromised backend could affect other workloads or users on the same host.
  • Attacker-controlled environment values could influence the launched process or its interactions with the host.

General mitigation guidance

Defensive patterns should prevent untrusted users from controlling processes on the shared backend. Gate stdio process launch behind an explicit, narrowly granted capability or an opt-in trust boundary, and apply authorization checks before any process is started. Where process execution is necessary, use a strict executable and argument allowlist, avoid accepting user-controlled environment values, and run processes with minimal permissions and isolation. Treat MCP protocol validation as a separate check, not as a substitute for controlling process launch.

How teams detect issues like this

Review endpoint handlers for process creation reachable from low-privilege routes, especially where request data influences executable names, arguments, or environment variables. Static analysis can flag subprocess APIs receiving request-derived values; code review should verify that authorization and trust checks happen before process creation. Runtime monitoring and policy enforcement can record or restrict backend process launches to approved executables and identities.

Sources

SourceLink
github.comgithub.com/heymrun/heym/commit/22b8ee60eb92128cf4ff04a9b6c0e1b62bf25a01
github.comgithub.com/heymrun/heym/commit/6c6213f88dfa8b2a70d23a9a271171241e910904
github.comgithub.com/heymrun/heym/releases/tag/v0.0.75
github.comgithub.com/heymrun/heym/security/advisories/GHSA-378x-q589-34mv

Frequently asked

questions

It concerns the stdio transport accepted by Heym's MCP fetch-tools endpoint, where the backend starts a supplied process before MCP validation. It is distinct from SSRF risks on the same endpoint.

An attacker needs an authenticated account. The described endpoint behavior is available even at the lowest role.

Prevent unauthorized process launch by enforcing role or capability checks before execution, and restrict any permitted launches to trusted executables and arguments.

Treat process execution as a privileged operation, keep user-controlled input out of process configuration, apply least privilege and isolation, and enforce launch policies through code review and runtime controls.

Find out what's already
exploitable in your codebase.