CVE-2026-113663: AG2: shell filter bypass via newline enables RCE

HIGH
Published November 5, 2026
CISO Take

AG2's SandboxShellTool allowlist and readonly filters fail to block newline and carriage-return separators, so an attacker who can influence an agent's shell command can append arbitrary statements that run through sh -c. With the default LocalEnvironment backend, the injected code runs as a host subprocess with the agent process's privileges, which gives full confidentiality, integrity and availability impact (CVSS 8.8). The vulnerability is not in CISA KEV, has no public exploit or Nuclei template, and EPSS and downstream dependent data are unavailable, so exploitation likelihood is unquantified. Even so, the bypass is trivial once an attacker can steer agent commands (for example through prompt injection), and teams that rely on allowed=[...] or readonly=True as a security boundary are exposed. Upgrade ag2 to 1.1.1 (or autogen beyond 0.14.1), and move agent shell execution to an isolated sandbox backend instead of the host.

Sources:NVDGitHub AdvisoryATLAS

What is the risk?

High. CVSS 8.8 (network, low complexity, low privileges, no user interaction). The filter omits \n and \r, a well-known CWE-184 incomplete denylist, so the bypass is easy to craft. Real-world risk depends on whether untrusted input (user prompts, retrieved documents, tool output) can influence agent commands, which is common in agentic deployments. No known in-the-wild exploitation, no public PoC, and not in KEV, so the near-term likelihood is moderate. Impact is high because the default LocalEnvironment runs commands on the host with the agent process's privileges.

How does the attack unfold?

Initial Access
Attacker influences agent input through a prompt, document or tool output so the agent issues a crafted shell command.
AML.T0051
Filter Bypass
A newline or carriage return separates a second statement that passes the prefix-only allowlist and readonly checks.
AML.T0053
Execution
The raw string is passed to sh -c and the injected statement runs as a host subprocess with the agent's privileges.
AML.T0050
Impact
Attacker steals credentials and data, modifies files, and establishes persistence or lateral movement.
AML.T0112.000

What systems are affected?

PackageEcosystemVulnerable RangePatched
AutoGenpip—No patch
61.7KOpenSSF 5.516 dependentsPushed 8d ago0% patchedFull package profile →

Do you use AutoGen? You're affected.

How severe is it?

CVSS 3.1
8.8 / 10
EPSS
N/A
Exploitation Status
No known exploitation
Sophistication
Trivial

What is the attack surface?

AVACPRUISCIA
AVNetwork
ACLow
PRLow
UINone
SUnchanged
CHigh
IHigh
AHigh

What should I do?

1 step
  1. 1) Upgrade ag2 to 1.1.1 or later and autogen to a fixed release past 0.14.1. 2) Until patched, do not rely on allowed=[...] or readonly=True as a security control; disable SandboxShellTool or run agents in containers or VMs with no secrets, a read-only filesystem, a non-root user and restricted egress. 3) Avoid the default LocalEnvironment for untrusted workloads. 4) Reject or sanitize commands containing newline (\n) and carriage-return (\r) characters in a wrapper before they reach the tool. 5) Detection: log and alert on agent-issued shell commands containing newlines or unexpected secondary commands, and on child processes spawned by the agent process that are not in the allowlist. 6) Rotate credentials accessible to any agent host that may have run untrusted input on affected versions. Review the GHSA-2h4w-29cv-2cmv advisory and the fix commit.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Article 15-Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.6-AI system operation and monitoring
NIST AI RMF
MANAGE 2.3-Respond to previously unknown risks
OWASP LLM Top 10
LLM01-Prompt InjectionLLM06-Excessive Agency

Frequently Asked Questions

What is CVE-2026-113663?

AG2's SandboxShellTool allowlist and readonly filters fail to block newline and carriage-return separators, so an attacker who can influence an agent's shell command can append arbitrary statements that run through sh -c. With the default LocalEnvironment backend, the injected code runs as a host subprocess with the agent process's privileges, which gives full confidentiality, integrity and availability impact (CVSS 8.8). The vulnerability is not in CISA KEV, has no public exploit or Nuclei template, and EPSS and downstream dependent data are unavailable, so exploitation likelihood is unquantified. Even so, the bypass is trivial once an attacker can steer agent commands (for example through prompt injection), and teams that rely on allowed=[...] or readonly=True as a security boundary are exposed. Upgrade ag2 to 1.1.1 (or autogen beyond 0.14.1), and move agent shell execution to an isolated sandbox backend instead of the host.

Is CVE-2026-113663 actively exploited?

No confirmed active exploitation of CVE-2026-113663 has been reported, but organizations should still patch proactively.

How to fix CVE-2026-113663?

1) Upgrade ag2 to 1.1.1 or later and autogen to a fixed release past 0.14.1. 2) Until patched, do not rely on allowed=[...] or readonly=True as a security control; disable SandboxShellTool or run agents in containers or VMs with no secrets, a read-only filesystem, a non-root user and restricted egress. 3) Avoid the default LocalEnvironment for untrusted workloads. 4) Reject or sanitize commands containing newline (\n) and carriage-return (\r) characters in a wrapper before they reach the tool. 5) Detection: log and alert on agent-issued shell commands containing newlines or unexpected secondary commands, and on child processes spawned by the agent process that are not in the allowlist. 6) Rotate credentials accessible to any agent host that may have run untrusted input on affected versions. Review the GHSA-2h4w-29cv-2cmv advisory and the fix commit.

What systems are affected by CVE-2026-113663?

This vulnerability affects the following AI/ML architecture patterns: agent frameworks, multi-agent systems, tool-using LLM agents, code execution sandboxes.

What is the CVSS score for CVE-2026-113663?

CVE-2026-113663 has a CVSS v3.1 base score of 8.8 (HIGH).

What is the AI security impact?

Affected AI Architectures

agent frameworksmulti-agent systemstool-using LLM agentscode execution sandboxes

MITRE ATLAS Techniques

AML.T0050Command and Scripting Interpreter
AML.T0051LLM Prompt Injection
AML.T0053AI Agent Tool Invocation
AML.T0112.000Local AI Agent

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: A.6.2.6
NIST AI RMF: MANAGE 2.3
OWASP LLM Top 10: LLM01, LLM06

What are the technical details?

Original Advisory

AG2 is an open-source AgentOS. From 0.13.2 until ag2 1.1.1, and from autogen 0.13.2 to 0.14.1, SandboxShellTool configurations using allowed=[...] or readonly=True rely on ShellAdapter._filter and contains_shell_operator in ag2/tools/sandbox/filter.py and ag2/tools/sandbox/adapter/shell.py to validate a command prefix and reject selected shell syntax. The filter omits newline and carriage-return separators, while the accepted raw string is passed to sh -c, allowing an attacker-influenced agent command to execute an additional arbitrary statement. With the default LocalEnvironment backend, the injected statement runs as a host subprocess with the privileges of the agent process and can affect confidentiality, integrity, and availability. This issue is fixed in ag2 version 1.1.1.

Exploitation Scenario

An attacker plants a malicious instruction in a document, web page or ticket that an AG2 agent ingests, steering it to run an allowlisted command such as 'ls' followed by a newline and a second statement. The filter validates only the prefix and rejects listed operators, but misses the newline, so the whole string is passed to sh -c. The injected statement executes on the host and exfiltrates environment variables and API keys to an attacker server, or installs a persistent reverse shell. Even if readonly=True was intended to prevent writes, the attacker can modify files and pivot into connected systems.

Weaknesses (CWE)

CWE-184 — Incomplete List of Disallowed Inputs: The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete.

  • [Implementation] Do not rely exclusively on detecting disallowed inputs. There are too many variants to encode a character, especially when different environments are used, so there is a high likelihood of missing some variants. Only use detection of disallowed inputs as a mechanism for detecting suspicious activity. Ensure that you are using other protection mechanisms that only identify "good" input - such as lists of allowed inputs - and ensure that you are properly encoding your outputs.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Timeline

Published
November 5, 2026
Last Modified
November 5, 2026
First Seen
November 5, 2026

Related Vulnerabilities