Skip to Content
RelayCase studiesGuardFall shell bypass

GuardFall shell bypass

When: Jun 30, 2026 (Adversa AI research)
Surface: 10 of 11 open-source coding / computer-use agents (opencode, Goose, Cline, Aider, OpenHands, SWE-agent, and others)
Class: Shell-quoting / expansion bypass of pattern-based command guards

Adversa AI showed that guards inspecting the raw command string miss payloads that Bash later expands ($IFS, quote removal, command substitution). A poisoned README, MCP server, or Makefile can then drive destructive commands with the operator’s privileges. Documented in awesome-ai-agent-attacks  and The Hacker News / SC Media.

Without Relay

  • Teams relied on client-side denylists inside the agent product—same class of string matching GuardFall beats.
  • Once bypassed, rm, credential theft, and cloud CLIs ran as the user with no second org control plane.
  • No Behavior Guard counted the destructive outcome class independently of the obfuscated spelling.

How Relay could have safeguarded

Be honest about limits: Relay bash rules also match with contains on the command text. That is necessary but not sufficient against clever obfuscation. Defense in depth:

LayerWhat to configureEffect on this path
Bash controlPrefer allowlists for day-to-day work (npm test, git status) over only denying rm -rfUnknown obfuscated strings never get a default allow
EnforcementSoft / Enforce on anything outside the allowlistHuman gate when the agent invents a weird one-liner
Path controlDeny reads of .ssh, .aws, .env regardless of which shell spelling is usedExfil via cat/type variants still hits path deny when the Read/path hook fires
Destructive BurstCount delete / destructive substrings / sensitive writesBurst of wipe attempts escalates even if one spelling slipped through
Prompt controlFlag “ignore safety” / exfil instructions from README-injected contextReduces successful injection before shell is proposed
AuditReview allows for novel shell shapes after incidentsTighten allowlist from real Live wire traffic

Retro checklist

  1. Move from “deny bad strings” to allow known good for production seats.
  2. Never rely on a single agent vendor’s local guard as the org control plane.
  3. Enable Destructive Burst + path denies on secrets as the backstop.
  4. After a GuardFall-style drill, paste failed bypass attempts into Rulebook samples and re-test.
Last updated on