All vulnerabilities

PyPI

CVE-2026-113663

AG2: Newline injection in SandboxShellTool bypasses allowed=[...] and readonly=True, enabling arbitrary command execution

Severity
High 8.8
Published
10 Nov 2026
Last changed
10 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
1.1.1
Exploit chance
0.6% in the next 30 daysHigher than 47% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Incomplete deny list (CWE-184)OS command injection (CWE-78)
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Also known as
GHSA-2h4w-29cv-2cmv
Sources
OSV.dev and GitHub

Description

SandboxShellTool's restricted modes — allowed=[...] (explicit command allowlist) and readonly=True (implicit READONLY_COMMANDS allowlist) — can both be bypassed by embedding a newline character inside the command string. The filter only inspects a single-line set of shell metacharacters, but execution runs the raw string through sh -c, where a shell treats an embedded newline exactly like a ; statement separator. An agent (or content that steers the agent, e.g. via prompt injection) can therefore run arbitrary shell commands even when the tool was configured to allow only a specific command prefix or only read-only commands. With the default LocalEnvironment() backend this is a real host subprocess (its own docstring: "Commands run via subprocess on the host, so there is no real isolation"), not an isolated container, so this is full host command execution, not merely an escape from an already-sandboxed environment.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
ag2PyPI · osv:PyPI:ag2
  • From 0.13.2 before 1.1.1
autogenPyPI · osv:PyPI:autogen
  • From 0.13.2 up to 0.14.1

About ag2

Weekly downloads (PyPI)
57,935PyPI Stats, 24 Nov 2026

This is the only vulnerability in ag2 in our list.

About autogen

Weekly downloads (PyPI)
23,682PyPI Stats, 24 Nov 2026

This is the only vulnerability in autogen in our list.

References