AG2 SandboxShellTool: files hidden with `ignore` are still readable through recursive `grep` / `diff` in readonly mode
CVE-2026-141554 · GHSA-xhqj-2fcc-8vf7 · published 2026-12-02
- Severity
- Low
- CVSS score
- 3.1
- Chance of exploitation (EPSS)
- 0.57%
- Fixed in
- 1.3.4
- Exploitation Public proof of concept
- Automatable No
- Technical impact Partial
- CISA SSVC
The operator runs an agent with on a local directory that contains the ignored files, and the agent processes content the attacker wrote (a document, a web page, tool output). If the model follows an injected instruction to run grep -r . ., the ignored files come back in the tool result. I scripted the model turn and did not test a live model. To receive the data the attacker also needs an output channel in the deployment, such as the agent's reply or another tool. The shell tool in readonly mode does not provide one. Every command that names an ignored path was refused in my tests: relative, absolute and .. …
Upgrade ag2 to 1.3.4 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
Either of these would do: When ignore is set, refuse grep/egrep/fgrep/diff with a recursion option (-r, -R, --recursive, -d recurse, --directories=recurse, bundled forms such as -rn) if a directory operand, or the implicit ., contains an ignored path. Say in the ignore and readonly docs that recursive grep/diff read ignored files, and change the "Hide sensitive files from the agent" example.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| ag2 | PyPI | >= 0.13.3, <= 1.3.3 | 1.3.4 |
- CriticalMarimo: Pre-Auth Remote Code Execution via Terminal WebSocket Authentication BypassmarimoExploited
- CriticalLangflow CORS misconfiguration enables Account Takeover and RCElangflowExploited
- HighLiteLLM: MCP Authentication Bypass via OAuth2 Passthrough FallbacklitellmExploited
- HighLangflow: IDOR Vulnerability in `/api/v1/responses` Endpoint Allows Authenticated Attackers to Access Another User's FlowlangflowExploited
- CriticalJupyter MCP Server: Host-header spoof bypasses the CVE-2026-77359/GHSA-9x8x-crjq-g64h fixjupyter-mcp-server
- CriticalUnauthenticated Superuser Token Issuance via Default-Enabled auto_login Endpointlangflow
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.