Case · DiggingBeagle record

A newline bypassed AG2 shell allowlists and read-only mode

AG2’s SandboxShellTool offered an allowlist and a read-only option, but its string filter checked only selected shell separators. A newline was still valid input to sh -c. An untrusted tool argument could therefore begin with an approved command and execute another command on the next line.

Public disclosure: Nov 10, 2026

Scope

Affected AG2 SandboxShellTool deployments where attacker-influenced text can reach the command argument; no known exploited victim.

Assessment profile

Assessment method
Setting
research demonstration
Exploitation
demonstrated
Evidence
Grade B
Remediation
patch available
AI role
AGAINST AI
Basis and provenance

The upstream GHSA describes an executable newline bypass and fixed AG2 1.1.1; no identified production victim or demonstrated agent-origin prompt-injection campaign. An impact band is not assigned because the available Claims do not establish a comparable verified severity or quantified harm.

Assessed Nov 12, 2026 using diggingbeagle.assessment/1.

At a glance

Mechanism and trust boundary

  1. 01

    An agent or caller supplies a command beginning with a permitted allowlist prefix.

  2. 02

    An embedded newline survives the filter and becomes a second command when parsed by the shell.

  3. 03

    The executor runs with the LocalEnvironment process privileges, possibly on the host.

Claims & evidence

CLM-R239-055-COREGHSA-2h4w-29cv-2cmv documents that CR/LF characters bypassed SandboxShellTool command filtering and allowed a second shell command despite configured allowlist or readonly mode.supported

Basis: reported finding

Link to claim

Implications

The observed effect is limited to the study or disclosed setting; deployment and independent impact remain unestablished.

Controls and mitigations

  • Avoid sh -c string concatenation; use structured process arguments, independent allowlisted binaries, OS-level restrictions and patched AG2 builds.

Unknowns and contradictions

  • Which downstream agent workflows exposed the argument and the safety of all legacy autogen distributions remain unresolved.

Sources and citation

Material revision history

  1. Nov 12, 2026 · Published version · first publication · revision 241