CVE-2026-141554
### Summary `SandboxShellTool(ignore=[...])` refuses a command when a path written in the command matches an ignore pattern. It does not look at files a program finds by itself. `readonly=True` allows `grep` and `diff`, and with `-r` they open every file under a directory, so `grep -r KEY .` prints the contents of `.env`, `*.key` and `secrets/**` while `cat .env` is refused. The docs cover part of this. `website/docs/user-guide/tools/local_shell.mdx:112` says: "`ignore` checks only the literal path words of the command. [...] A program that opens paths on its own (`sh -c`, `find`) is not covered; use an isolated backend for that." Both examples in that note are programs `readonly=True` does not allow. The built-in read-only list contains `grep`, `egrep`, `fgrep` and `diff` (`ag2/tools/sandbox/filter.py:25-43`), the same page recommends `grep -r --include='*.py'` in restricted mode (line 139), and `common_toolkits.mdx:346-347` introduces `ignore=["**/.env", "*.key", "secrets/**"]` as "Hide sensitive files from the agent". An operator who combines `readonly=True` with `ignore` can reasonably expect those files to stay hidden, and they don't. If you read the note at line 112 as already covering recursive `grep`, I'm fine with closing this as a documentation issue. ### Affected versions PyPI `ag2` 1.3.2 (latest, tested 2026-11-19) and 1.3.1 (tested 2026-11-15). `main` at `7a65080` has the same `filter.py`. Older releases were not checked. ### Impact The operator runs an agent with `SandboxShellTool(readonly=True, ignore=[...])` 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
Properties
- Severity
- low
- Summary
- AG2 SandboxShellTool: files hidden with `ignore` are still readable through recursive `grep` / `diff` in readonly mode
- Nvd fetched at
- 2026-12-04T15:00:48.841578+00:00
- Epss score
- 0.00575
- Cvss severity
- LOW
- Cvss score
- 3.1
- Retrieved at
- 2026-12-04T15:02:58+00:00
- Ghsa published
- 2026-12-02T23:55:12Z
- Source url
- https://github.com/advisories/GHSA-xhqj-2fcc-8vf7
- Ghsa updated
- 2026-12-02T23:55:13Z
- Ghsa id
- GHSA-xhqj-2fcc-8vf7
- Last source
- FIRST EPSS
- Score
- 3.1
- Cvss version
- 3.1
- Cve id
- CVE-2026-141554
- Cvss vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
- First seen by Signal
- 2026-12-02T22:45:38+00:00
- Name
- CVE-2026-141554
- Is ghsa only
- false
- Vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
Related Entities (5)
AFFECTS (2)
VULNERABLE_TO (2)
HAS_WEAKNESS (1)
Related research
Explore deeper with Ninja Signal's threat intelligence graph