Newline injection in AG2 SandboxShellTool allows command execution
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-78.
Summary
AG2 from 0.13.2 before 1.1.1 and autogen from 0.13.2 through 0.14.1 are affected. The command filter in SandboxShellTool, used with allowed=[...] or readonly=True, does not treat newline and carriage return characters as separators (CWE-184). A remote attacker with low privileges who can influence the agent's command can run an extra arbitrary statement. With the default LocalEnvironment backend, that statement runs as a host subprocess with the privileges of the agent process.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Update ag2 to version 1.1.1, which fixes this issue. The sources list no fixed version for autogen.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA ag2 (ag2ai) Fixed in 1.1.1
Vendor assessments
Timeline
- 2026-11-05 Threatist record created from CVE-2026-113663
- 2026-11-06 Affected versions changed · Red Hat
- 2026-11-06 CVSS score added · Red Hat
- 2026-11-07 Priority changed: MEDIUM → LOW
References
More ag2ai vulnerabilities
- TI-2026-70542 Path traversal in ag2 UserProxyAgent via filename argument CVSS 4.0MEDIUM 5.3
Sources
- CVE-2026-113663 · CVE Program
- CVE-2026-113663 · NVD
- FIRST EPSS
- CVE-2026-113663 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences