CrewAI agent runs code outside a sandbox
HighAV-FW-003Runtime safetyFramework pack
What it finds
A CrewAI agent can execute code, and it is not set to the Docker-sandboxed "safe" mode.
Why it matters
Code the model writes would run directly on the host, with access to its files, network, and secrets.
What an attacker could do: A manipulated agent could run arbitrary code on the machine hosting the crew.
How to fix it
Set code_execution_mode="safe" (Docker sandbox), or turn code execution off for agents that do not need it.
Pro shows the corrected code for your exact file, step by step, and re-scans to confirm the fix. See plans
Check details
- Finding code
- CREWAI_UNSAFE_CODE_EXECUTION
- How it detects
- Looks for a risky pattern, and stays quiet when a matching safeguard is present.
- Confidence
- Definite: the risky setting is written plainly in the file.
- Scans
- Agent source using the named framework (LangChain, CrewAI, AutoGen, OpenAI Agents SDK, Claude Agent SDK, computer-use tools)
- OWASP LLM Top 10
- LLM08 - Excessive Agency, LLM02 - Insecure Output Handling
- NIST AI RMF
- MG-2.2
- SOC 2
- CC6.8, CC7.1
Check your agent for this
Paste your agent code or MCP config. The free scan runs all 124 checks in about 10 seconds — no account needed.
Related checks
- Command injection riskAV-RUNTIME-004 · Critical
- Unsafe dynamic code executionAV-RUNTIME-005 · Critical
- Privileged or host-mounted container configurationAV-RUNTIME-007 · Critical
- SQL query built from unescaped inputAV-RUNTIME-009 · Critical
- Unsafe deserialization of untrusted dataAV-RUNTIME-010 · Critical
- Prompt injection surface detectedAV-RUNTIME-002 · High