All vulnerabilities

PyPI

CVE-2026-141554

AG2 SandboxShellTool: files hidden with `ignore` are still readable through recursive `grep` / `diff` in readonly mode

Severity
Low 3.1
Published
2 Dec 2026
Last changed
3 Dec 2026
Added to UpHeron
3 Dec 2026
Fixed in
1.3.4
Weakness
Incorrect authorization (CWE-863)
Attack
Over the network · Only under certain conditions · No login needed · Needs someone to click or open something
Attacker can
Read some data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
Also known as
GHSA-xhqj-2fcc-8vf7
Sources
OSV.dev and GitHub

Description

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".

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
ag2PyPI · osv:PyPI:ag2
  • From 0.13.3 before 1.3.4
autogenPyPI · osv:PyPI:autogen
  • From 0.13.3 up to 0.14.1

About ag2

Weekly downloads (PyPI)
60,092PyPI Stats, 1 Dec 2026

Vulnerabilities in ag2

In our list
2
Published in the last 12 months
2
Critical, last 12 months
0
High, last 12 months
1
Known exploited
0
Search the list for ag2

About autogen

Weekly downloads (PyPI)
26,688PyPI Stats, 1 Dec 2026

Vulnerabilities in autogen

In our list
2
Published in the last 12 months
2
Critical, last 12 months
0
High, last 12 months
1
Known exploited
0
Search the list for autogen

References