A high-severity vulnerability in Heym, a self-hosted platform for building agentic systems and business-process automations, allowed any authenticated user to execute arbitrary commands on the backend host through the MCP stdio transport.
Quick Take
- What: CVE-2026-67546, a command execution flaw in Heym’s POST /api/mcp/fetch-tools endpoint accepting the stdio transport
- Who is affected: All Heym installations prior to version 0.0.75, particularly multi-tenant deployments
- Severity: High (CVSS 8.8), any authenticated user could run commands on the shared backend host
- What to do: Upgrade to Heym version 0.0.75 or later immediately
- Fixed in: Version 0.0.75, released July 21, 2026
In plain English
Heym is a tool that developers use to build AI agent systems on their own servers. A security flaw let any logged-in user run any command they wanted on the server that runs Heym, even users with the lowest permission level. In setups where the Heym server also had access to Docker (a common container tool), an attacker could take complete control of the host machine. The Heym team fixed this in version 0.0.75 by running these commands inside a locked-down container instead of directly on the server.
What you should do: If you use Heym, update to version 0.0.75 now; otherwise you can ignore this.
What happened
The vulnerability existed in Heym’s MCP (Model Context Protocol) stdio transport handler. The POST /api/mcp/fetch-tools endpoint, reachable by any authenticated user regardless of role, accepted a stdio transport type that would spawn a caller-supplied command with caller-supplied arguments directly on the backend host.
The critical flaw was that the process executed during connection setup, before any MCP protocol validation could reject it. This meant side effects fired even when the command did not speak the MCP protocol and the request ultimately returned a 422 Connection closed error.
The vulnerability was distinct from a separate SSRF issue (referenced as Advisory 2) on the same endpoint. According to the security advisory, the project’s README documented Docker socket mounts and Docker-based stdio-MCP as an intended host-control capability for trusted workflow authors. However, the endpoint required only the lowest authenticated role, creating a privilege asymmetry in multi-tenant deployments.
In addition to the command execution primitive, the implementation merged the caller’s environment variables over os.environ, potentially exposing backend secrets including SECRET_KEY, ENCRYPTION_KEY, full DATABASE_URL, and provider API keys to the spawned process.
A proof-of-concept exploit demonstrated the issue:
POST /api/v4/mcp/fetch-tools
{"connection":{"transport":"stdio","command":"/bin/sh","args":["-c","id > /tmp/pwned"]}}This executed the command on the host and confirmed arbitrary command execution.
Combined with the documented docker.sock mount and a root backend container configuration, the vulnerability provided a path to host root access.
What you should do
Upgrade to Heym version 0.0.75 immediately. The fixed version runs MCP stdio servers in a hardened, throwaway container instead of on the backend host.
The new sandbox implementation:
- Runs non-root with cap-drop ALL, no-new-privileges, and read-only root filesystem
- Applies CPU, memory, and PID limits
- Does not receive the Docker socket
- Does not forward backend environment secrets
- Refuses caller-supplied mounts and flags that would dissolve the isolation boundary
The isolation is controlled by the new HEYM_MCP_STDIO_SANDBOX environment variable, which defaults to auto (Docker required, fail-closed). This setting is deliberately separate from HEYM_PYTHON_TOOL_SANDBOX to ensure operators who select subprocess for Python tool compatibility do not silently lose MCP stdio isolation.
For docker run [flags] IMAGE [args] commands, Heym now starts the specified image with hardening applied, carrying over -e, -w, and –entrypoint flags while refusing flags like –privileged, –cap-add, –device, –security-opt, –network host, and volume-related options that would break the security boundary.
What it means
This vulnerability represented a significant privilege escalation in multi-tenant Heym deployments. While the project’s design anticipated trusted workflow authors having host-level control in single-user scenarios, the lowest-role reachability of the vulnerable endpoint created an unintended security gap in shared backend environments.
The fix moves MCP stdio execution into a container-based sandbox, aligning the security posture with the existing Python tool sandbox while maintaining the functionality needed for legitimate MCP server operations. Network egress remains enabled because npx and uvx must fetch packages and MCP servers are designed to call external APIs.
The vulnerability was reported by sajdakabir and fixed in commits 22b8ee6 and 6c6213f. The Heym team credited the reporter in their SECURITY.md file and released version 0.0.75 on July 21, 2026.
—



