{"id":"CVE-2026-113663","published":"2026-11-05T22:53:40Z","modified":"2026-11-09T17:40:51Z","title":"AG2: Newline injection in SandboxShellTool bypasses allowed=[...] and readonly=True, enabling arbitrary command…","vendor":"ag2ai","product":"ag2","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00561,"percentile":0.47522,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"},{"id":"CWE-184","name":"Incomplete List of Disallowed Inputs"}],"references":[{"url":"https://github.com/ag2ai/ag2/security/advisories/GHSA-2h4w-29cv-2cmv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/ag2ai/ag2/commit/3cd86726bb731eb11d6270f0ef9e50e42b5abb39","tags":["x_refsource_MISC"]},{"url":"https://github.com/ag2ai/ag2/releases/tag/v1.1.1","tags":["x_refsource_MISC"]}],"priority":{"score":15.7,"factors":[{"name":"EPSS percentile","points":9.5},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"ag2ai","affectedVersions":[{"vendor":"ag2ai","product":"ag2","versions":[">= 0.13.2, < 1.1.1"]},{"vendor":"ag2ai","product":"autogen","versions":[">= 0.13.2, <= 0.14.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-11-09T17:37:11.466545Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"ag2","vulnerableRanges":[">=0.13.2, <1.1.1"],"patched":["1.1.1"],"from":["GHSA-2h4w-29cv-2cmv"],"provenance":"source"},{"ecosystem":"PyPI","package":"autogen","vulnerableRanges":[">=0.13.2, <=0.14.1"],"patched":[],"from":["GHSA-2h4w-29cv-2cmv"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-117877","exploited":false,"provenance":"source"}}