CVE-2026-37008: CrewAI: sandbox escape via ctypes bypasses blocklist
HIGHPoC AVAILABLECISA: ATTENDCrewAI's Python code-execution sandbox blocks dangerous modules by name at import time, but this does not stop code from reaching the same capabilities through Python's object graph, such as loading the C library with ctypes.CDLL(None) and no import statement. Any agent allowed to run model-generated code in this sandbox should be treated as able to execute arbitrary native code on the host, and the changed scope in the CVSS vector (S:C) reflects that the sandbox boundary is the broken control. Exploitation requires local access and is rated high complexity, and the EPSS score is low (0.00163), yet the model places it in the top 95th percentile. A public PoC exists, CISA SSVC says ATTEND, and it is not in CISA KEV. Upgrade to a CrewAI build that includes commit fb2323b, and until then disable or isolate code-interpreter tools, running them only in a container or VM with no credentials, no network egress and no sensitive mounts.
What is the risk?
High (CVSS 8.1). The attack is local with high complexity and needs no privileges or user interaction. The scope change means a successful exploit escapes the sandbox and affects the host, giving high confidentiality and integrity impact and limited availability impact. The EPSS score of 0.00163 indicates low near-term mass exploitation, but a public PoC exists and the SSVC decision is ATTEND. Exposure depends on whether untrusted or prompt-injectable content can drive the agent's code-execution tool. Deployments that expose such agents to external input carry the highest risk. Package-level data (dependents, OpenSSF score, repository activity) is unavailable, so blast radius is uncertain.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| CrewAI | pip | — | No patch |
Do you use CrewAI? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step1) Upgrade CrewAI to a release that contains commit fb2323b3deb3ec62b3965526857e77a2264e4cd0 or later, and confirm the fix is present in your installed version. 2) Until patched, disable the code interpreter or code execution tools for agents, or run them only in Docker mode or in a dedicated VM or container. 3) Do not rely on in-process Python sandboxes. Use OS-level isolation such as a non-root user, seccomp or AppArmor profiles, read-only filesystems, no mounted secrets and egress filtering. 4) Reduce secrets in agent environments and use short-lived, scoped credentials. 5) Detection: monitor agent hosts for unexpected use of ctypes, dlopen or libc loading, child process spawns, and unusual outbound connections from agent processes. Review agent logs for generated code that references ctypes, CDLL, or the object-graph traversal pattern (__subclasses__, __globals__).
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-37008?
CrewAI's Python code-execution sandbox blocks dangerous modules by name at import time, but this does not stop code from reaching the same capabilities through Python's object graph, such as loading the C library with ctypes.CDLL(None) and no import statement. Any agent allowed to run model-generated code in this sandbox should be treated as able to execute arbitrary native code on the host, and the changed scope in the CVSS vector (S:C) reflects that the sandbox boundary is the broken control. Exploitation requires local access and is rated high complexity, and the EPSS score is low (0.00163), yet the model places it in the top 95th percentile. A public PoC exists, CISA SSVC says ATTEND, and it is not in CISA KEV. Upgrade to a CrewAI build that includes commit fb2323b, and until then disable or isolate code-interpreter tools, running them only in a container or VM with no credentials, no network egress and no sensitive mounts.
Is CVE-2026-37008 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2026-37008, increasing the risk of exploitation.
How to fix CVE-2026-37008?
1) Upgrade CrewAI to a release that contains commit fb2323b3deb3ec62b3965526857e77a2264e4cd0 or later, and confirm the fix is present in your installed version. 2) Until patched, disable the code interpreter or code execution tools for agents, or run them only in Docker mode or in a dedicated VM or container. 3) Do not rely on in-process Python sandboxes. Use OS-level isolation such as a non-root user, seccomp or AppArmor profiles, read-only filesystems, no mounted secrets and egress filtering. 4) Reduce secrets in agent environments and use short-lived, scoped credentials. 5) Detection: monitor agent hosts for unexpected use of ctypes, dlopen or libc loading, child process spawns, and unusual outbound connections from agent processes. Review agent logs for generated code that references ctypes, CDLL, or the object-graph traversal pattern (__subclasses__, __globals__).
What systems are affected by CVE-2026-37008?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, multi-agent orchestration, code interpreter tools, LLM agent sandboxes.
What is the CVSS score for CVE-2026-37008?
CVE-2026-37008 has a CVSS v3.1 base score of 8.1 (HIGH). The EPSS exploitation probability is 0.16%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0050Command and Scripting InterpreterAML.T0053AI Agent Tool InvocationAML.T0097Virtualization/Sandbox EvasionAML.T0105Escape to HostCompliance Controls Affected
What are the technical details?
Original Advisory
CrewAI before fb2323b offers a Python blocklist approach that operates at the wrong level of abstraction, a different vulnerability than CVE-2026-2275. Import-time blocking of module names does not address the availability of Python's complete object graph. For example, calling ctypes.CDLL(None) loads the C library without relying in any import statements. In other words, a within-process sandbox cannot merely account for the import system and instead must account for the complete runtime of the Python interpreter.
Exploitation Scenario
An attacker plants an indirect prompt injection in a document, web page or ticket that a CrewAI research agent ingests. The injected instructions get the agent to run a Python snippet in its code-execution tool. The snippet calls ctypes.CDLL(None) to load the C library without any import the blocklist would catch, then uses it to invoke system calls or spawn a shell. The attacker reads environment variables containing LLM and cloud API keys, steals local data, and uses the host as a foothold for lateral movement or to abuse the agent's connected tools.
Weaknesses (CWE)
CWE-424 — Improper Protection of Alternate Path: The product does not sufficiently protect all possible paths that a user can take to access restricted functionality or resources.
- [Architecture and Design] Deploy different layers of protection to implement security in depth.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:LReferences
Timeline
Related Vulnerabilities
CVE-2026-1123087.4CrewAI Tools: SSRF in SeleniumScrapingTool leaks cloud creds
Same package: crewaiCVE-2026-622407.4CrewAI: SSRF filter bypass via DNS rebinding
Same package: crewaiCVE-2026-1166916.5MLflow: CrewAI autolog leaks LLM API keys to traces
Same package: crewaiCVE-2026-92206CrewAI: unsafe reflection in agent loader enables RCE
Same package: crewaiCVE-2026-120630CrewAI: SSRF guard parser differential enables internal access
Same package: crewai