ThinkFacility Sign in
  1. Home
  2. Security
  3. Python package (ag2)
HighPython package (ag2)

AG2 before 1.1.1: agents limited to safe shell commands can run any command, update now

Python developers building AI agents with AG2 (AutoGen) who give them SandboxShellTool with an allowed list or readonly=True.

How to fix it

You haveUpdate to
>= 0.13.2, < 1.1.1→1.1.1

Check your version

Which version you have
pip show ag2

Update

pip
pip install --upgrade "ag2>=1.1.1"
uv
uv add "ag2>=1.1.1"

SandboxShellTool checked commands for ; and && but not for a newline, and the shell treats a newline the same way. An agent limited to cat could run anything after it, and text the agent reads can steer it there. The default LocalEnvironment runs them on your machine. The autogen package name, 0.13.2 to 0.14.1, has no fixed release listed.

Sources