Skip to content

AAK-CREWAI-CVE-2026-2275-001: CrewAI CodeInterpreterTool with unsafe_mode=True

Severity
CRITICAL
Category
Agent Config (agent-config)
Scanner
agent_audit_kit/scanners/crewai_rce_chain.py
Auto-fixable
No.
SARIF name
CrewAiCodeInterpUnsafeMode

What it detects

CodeInterpreterTool(unsafe_mode=True) drops into a host Python interpreter where ctypes / os.system are reachable. CVE-2026-2275 is the canonical sandbox-escape primitive in the CrewAI 0.x chain (ThaiCERT 2026-04-02 / CERT/CC VU#221883; CWE-749, CVSS 9.6 CRITICAL per NVD — the Docker-unreachable fallback to SandboxPython enables RCE via arbitrary C function calling).

How to fix

Set unsafe_mode=False on every CodeInterpreterTool invocation. If you must run untrusted code, wrap with a real container sandbox and call agent_audit_kit.sanitizers.crewai.assert_codeinterp_safe_mode(False) in the same function to suppress this rule.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-CREWAI-CVE-2026-2275-001

Limitations

Fires on a literal unsafe_mode=True in a CodeInterpreterTool(...) call in a file that imports crewai. unsafe_mode taken from a variable or a setting is not read, and the guard is looked for as text in the enclosing function, so a comment that mentions assert_codeinterp_safe_mode( silences it. A Python file over 512 KB is not read.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-CREWAI-CVE-2026-2275-001.md: the page then shows that text, with the registry reference appended under it.