Intel

AIKIDO-2026-11070

e2b is vulnerable to Command Injection

Command Injection Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Yesterday

73

High Risk

This Affects:

PYTHONe2b
2.4.0 - 2.20.0
Fixed in 2.20.1
Are you affected? Scan for Free

TL;DR

The sandbox creation flow exposed a command injection flaw by embedding a JSON-serialized mcp config directly into a shell command enclosed in single quotes. Because standard JSON serialization does not escape single quotes, an attacker could supply a crafted config value containing ' to break out of the quoted context and append arbitrary shell commands. In practice, this could let a malicious user execute commands inside the sandbox during setup, potentially altering the environment, accessing sensitive data, or installing persistence. The issue is fixed by wrapping the JSON string with shlex.quote(), which safely escapes it for shell usage.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

e2b is vulnerable to Command Injection in versions 2.4.0 - 2.20.0.

How to fix this

Upgrade the e2b library to the patch version.