CVE-2026-55376
Auth user can bypass Python sandbox via unsafe std‑lib imports, enabling exec() code execution.
- CVSS 8.8
- CWE-78
- Design Defects
- Remote
Heym builds and runs agentic systems and business-process automations on self-hosted infrastructure. Prior to 0.0.40, an authenticated user who can create or edit a workflow with an Agent custom Python tool can bypass the blacklist-based sandbox in backend/app/services/python_tool_executor.py because allowed standard-library modules expose operating-system, process, and filesystem capabilities through public attributes that pass _safe_import() and _validate_code_safety(). The runner then executes the supplied tool with exec(), permitting commands and file operations as the backend application user; self-registration affects reachability, but portal triggering alone does not grant code control. This issue is fixed in 0.0.40.
- CWE
- CWE-78
- CVSS base score
- 8.8
- Published
- 2026-10-13
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Design Defects
- Subcategory
- Poorly Designed Access Controls
- Accessibility scope
- Remote
- Impact
- Arbitrary Code Execution
- Affected component
- Python
Solution
Upgrade Heym to version 0.0.40 or later.
Vulnerable code sample
import ast
def run_custom_tool(tool_code: str):
"""
Executes a user‑provided Python tool inside the sandbox.
"""
# VULNERABLE: uses exec with full globals allowing OS/module abuse
exec(tool_code, {"__builtins__": __builtins__})Patched code sample
import ast
def run_custom_tool(tool_code: str):
"""
Executes a user‑provided Python tool inside the sandbox.
"""
# FIX: restrict globals to an empty dict to prevent unsafe imports
exec(tool_code, {"__builtins__": {}})Published fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- Isolate Python tool execution with OS-level sandbox (GHSA-wcgw-9hfw-f6f2) (heymrun/heym)
backend/app/services/python_tool_executor.py,backend/app/services/python_tool_executor.py · execute_tool
Cite this entry
@misc{vaitp:cve202655376,
title = {{Auth user can bypass Python sandbox via unsafe std‑lib imports, enabling exec() code execution.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-55376},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-55376/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
