CVE-2026-113663 AG2: Newline injection in SandboxShellTool bypasses allowed=[...] and readonly=True, enabling arbitrary command execution
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: total
Description
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.
Upgrade path
4 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| pypi ag2(PyPI) | = 0.13.2; = 0.13.3; = 0.13.4; = 0.14.0 +10 more | 1.1.1 | Fixed |
| pypi autogen(PyPI) | = 0.13.2; = 0.13.3; = 0.13.4; = 0.14.0 +3 more | after 0.14.1 | Fixed |
| ag2ai ag2 | = >= 0.13.2, < 1.1.1 | No fix listed | Versions listed |
| ag2ai autogen | = >= 0.13.2, <= 0.14.1 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi ag2(PyPI) | >= 0.13.2, < 1.1.1 | 1.1.1 |
| pypi ag2(PyPI) | = 0.13.2 | No fix listed |
| pypi ag2(PyPI) | = 0.13.3 | No fix listed |
| pypi ag2(PyPI) | = 0.13.4 | No fix listed |
| pypi ag2(PyPI) | = 0.14.0 | No fix listed |
| pypi ag2(PyPI) | = 1.0.0 | No fix listed |
| pypi ag2(PyPI) | = 1.0.0b0 | No fix listed |
| pypi ag2(PyPI) | = 1.0.1 | No fix listed |
| pypi ag2(PyPI) | = 1.0.2 | No fix listed |
| pypi ag2(PyPI) | = 1.0.3 | No fix listed |
| pypi ag2(PyPI) | = 1.0.4 | No fix listed |
| pypi ag2(PyPI) | = 1.0.5 | No fix listed |
| pypi ag2(PyPI) | = 1.0.6 | No fix listed |
| pypi ag2(PyPI) | = 1.1.0 | No fix listed |
| pypi autogen(PyPI) | >= 0.13.2, <= 0.14.1 | No fix listed |
| pypi autogen(PyPI) | = 0.13.2 | No fix listed |
| pypi autogen(PyPI) | = 0.13.3 | No fix listed |
| pypi autogen(PyPI) | = 0.13.4 | No fix listed |
| pypi autogen(PyPI) | = 0.14.0 | No fix listed |
| pypi autogen(PyPI) | = 0.14.1 | No fix listed |
| pypi autogen(PyPI) | = 0.14.1rc1 | No fix listed |
| ag2ai ag2 | = >= 0.13.2, < 1.1.1 | No fix listed |
| ag2ai autogen | = >= 0.13.2, <= 0.14.1 | No fix listed |
References
- https://github.com/ag2ai/ag2/security/advisories/GHSA-2h4w-29cv-2cmv vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/ag2ai/ag2/commit/3cd86726bb731eb11d6270f0ef9e50e42b5abb39 patch
- github.com product
- https://github.com/ag2ai/ag2/releases/tag/v1.1.1
- github.com
- ENISA EUVD EUVD-2026-117877 third-party-advisory