# CVE-2026-45227: Heym sandbox escape in Python tool executor

Source: https://junglewise.ai/threats/cve-2026-45227-heym-sandbox-escape-in-python-tool-executor  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-12. Updated: 2026-07-14  
License: CC BY 4.0 with a link back

CVE-2026-45227 · Severity: high · CVSS 8.8 · Published 2026-05-12

Heym is an AI agent workflow platform that allows users to run custom Python code as part of their automation. A security flaw in the code execution environment allows an authorized user to break out of the restricted 'sandbox' and run unauthorized commands on the underlying server. This could lead to the theft of sensitive database credentials, encryption keys, and full control over the backend service.

Technologies: [Heymrun Heym](https://junglewise.ai/threats/technologies/heym). Vendors: [Heymrun](https://junglewise.ai/threats/vendors/heymrun).

## Quick answers

**Is CVE-2026-45227 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-45227 being exploited in the wild.

**How severe is CVE-2026-45227?** High severity, with a CVSS score of 8.8, published 12 May 2026.

**Which products and versions are affected?** Heymrun Heym < 0.0.21.

**Is there a fix for CVE-2026-45227?** A patch was published on 2026-05-10: Fix merged in PR #94 and released in v0.0.21 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-45227 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-45227?** Check whether you run Heymrun Heym at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A sandbox escape exists in the `python_tool_executor.py` component of Heym due to insufficient filtering of Python introspection primitives. While the environment attempted to blacklist dangerous builtins like `exec` and `__import__`, an attacker can use object-graph introspection (e.g., accessing `__subclasses__` via the `object` class) to recover the original `__builtins__` dictionary. This allows the importation of restricted modules such as `os` and `subprocess`. Furthermore, because the tool runner inherited the backend's environment variables and working directory, an attacker can extract sensitive secrets or execute commands as the backend service user. The vulnerability is fixed in version 0.0.21 by implementing AST-based validation and scrubbing the subprocess environment.

## Affected products

- heymrun Heym < 0.0.21

## Timeline

- 2026-05-10: patched: Fix merged in PR #94 and released in v0.0.21
- 2026-05-12: advisory: NVD and VulnCheck advisory published

## References

- [https://github.com/heymrun/heym/commit/32b7e809d987d9b018ec8daa2cdaf48f627f26f1](https://github.com/heymrun/heym/commit/32b7e809d987d9b018ec8daa2cdaf48f627f26f1)
- [https://github.com/heymrun/heym/pull/94](https://github.com/heymrun/heym/pull/94)
- [https://github.com/heymrun/heym/releases/tag/v0.0.21](https://github.com/heymrun/heym/releases/tag/v0.0.21)
- [https://www.vulncheck.com/advisories/heym-sandbox-escape-via-python-introspection](https://www.vulncheck.com/advisories/heym-sandbox-escape-via-python-introspection)

## Related threats

- [Heym privilege escalation via error_workflow_id field](https://junglewise.ai/threats/cve-2026-110873-heym-from-0-0-55-before-0-0-121-contains-a-privilege-escalation)
- [Heym token leakage in HITL review links via header spoofing](https://junglewise.ai/threats/cve-2026-105396-heym-before-v0-0-112-contains-a-token-leakage-vulnerability-in)
- [Heym Telegram webhook auth bypass](https://junglewise.ai/threats/cve-2026-101050-heym-before-0-0-53-fails-to-verify-the-x-telegram-bot-api-secret)
- [Heym authentication bypass in Slack webhook verification](https://junglewise.ai/threats/cve-2026-101049-heym-before-0-0-53-fails-to-verify-slack-request-signatures-when)
- [Heym multiple RCE and authentication bypass vulnerabilities](https://junglewise.ai/threats/cve-2026-100865-heym-before-0-0-53-contains-multiple-independent-vulnerabilities)
