e2b is vulnerable to Command Injection
73
High Risk
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.
You are affected if you are using a version that falls within the vulnerable range.
e2b is vulnerable to Command Injection in versions 2.4.0 - 2.20.0.
Upgrade the e2b library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

SOC 2Compliant
ISO 27001Compliant