A vulnerability in AG2’s SandboxShellTool allowed attackers to bypass command restrictions by inserting a newline character, enabling arbitrary command execution on the host system.
Quick Take
- What: CVE-2026-113663, a CVSS 8.8 command injection flaw in AG2’s SandboxShellTool that lets newline characters bypass the allowlist
- Who is affected: Deployments using SandboxShellTool in allowlist or readonly mode with ag2 versions 0.13.2 through 1.1.0, or autogen 0.13.2 through 0.14.1
- Fixed in: ag2 1.1.1 (released September 29, 2026); no fixed version listed for autogen
- What to do: Update ag2 to 1.1.1, or treat autogen’s allowlist and readonly modes as unenforced
- Credit: Discovered by elstati0n
In plain English
AG2 is a framework for building AI agents that can run shell commands. It has a security feature called SandboxShellTool that is supposed to restrict which commands an agent can run. Researchers found that adding a newline character (like pressing Enter) in a command let the agent sneak a second, forbidden command past the filter. Both commands then ran on the computer with no isolation.
What you should do: If you use AG2 to build agents, update to version 1.1.1. If you use the older autogen package, the maintainers have not released a fix, so do not rely on its command restrictions to keep your system safe.
What happened
The GitHub Advisory Database published CVE-2026-113663 on November 10, 2026, after the National Vulnerability Database published the record on November 5. The AG2 maintainers had disclosed the flaw in their own advisory on September 29, 2026, crediting the reporter elstati0n, and shipped the fix in AG2 1.1.1 the same day.
SandboxShellTool enforced both its restricted modes (an explicit allowlist and readonly mode) through a single filter that looked for shell operators. That list left out the newline and carriage return characters. The command then ran through sh -c, which treats a newline as a statement separator in the same way as a semicolon.
A command that opens with an allowed program and continues on a second line therefore passed the check, and both statements ran. The default LocalEnvironment backend provides no isolation, so the second command ran on the host.
Who is affected
Deployments that hand an agent SandboxShellTool in allowlist or readonly mode are the exposed ones, because those are the modes the filter was meant to enforce.
- ag2: versions 0.13.2 through 1.1.0
- autogen: versions 0.13.2 through 0.14.1
The advisory records no fixed version for autogen.
What you should do
Update ag2 to 1.1.1. The release notes say restricted mode now splits the command into an argument list and runs it without a shell. The update also drops find, file, sort, uniq and git from the built-in readonly set.
Because the advisory lists no fixed autogen version, treat that package’s allowlist and readonly modes as unenforced rather than as a security boundary.
What it means
This vulnerability is classified as CWE-78 (OS command injection) and CWE-184 (incomplete list of disallowed inputs). The CVSS 8.8 score reflects the high impact: an attacker with low privileges and no user interaction can achieve high confidentiality, integrity and availability impact on the vulnerable system.
The flaw underscores the difficulty of building secure command filters. Shell metacharacters are numerous, and missing even one can defeat the entire allowlist. The AG2 team’s fix avoids the shell entirely by splitting commands into argument lists, a more robust approach than trying to enumerate every dangerous character.



