Skip to content

Back to the catalog

AI Security Briefing
adversa.aiwriteup

AI Security Briefing

Adversa AI's "GuardFall" research shows that decades-old shell tricks (quote removal, $IFS expansion, command substitution, base64-to-sh piping, and destructive argv flags like `find -delete`) let prompt-injected content bypass the pattern-matching shell-command guards in most popular open-source AI coding agents, because the guards inspect raw command strings while bash rewrites them before execution. Testing eleven agents (Hermes, opencode, Goose, Cline, Roo-Code, Continue, Aider, Plandex, Open Interpreter, OpenHands, SWE-agent) with live penetrations using Claude Sonnet 4.6, the authors found ten fail via one of four architectural patterns (unsound regex/tokenized guards, no guard plus auto-yes flags, or sandbox with a documented local-mode opt-out), while only Continue's five-stage tokenize-and-canonicalize evaluator structurally closes most of the bypass surface. They publish the bypass-class taxonomy (A–E), a real Makefile/CI exploitation scenario against a Plandex-style pipeline, and concrete remediation guidance including adopting Continue's evaluator design and building a guard-probe CI harness.

TL;DR A survey of 11 open-source AI coding agents shows classic shell-quoting/expansion tricks bypass nearly all of their command-execution safety guards under prompt injection; only Continue's tokenize-and-canonicalize evaluator holds up.
Document

What it is

Adversa AI's GuardFall research: a class of bypasses against pattern-based shell-command guards in 11 open-source AI coding/computer-use agents (surveyed as of May 2026, ~548,000 combined GitHub stars). It began with an approval-gate bypass in NousResearch/hermes-agent (commit 81cd67829) against a 30-pattern regex denylist (their failure ID F01).

How it works

The guard inspects the raw command string; bash then performs quote removal, parameter expansion, command substitution, $IFS splitting, etc. before execution. The inspected text and the executed text differ, so decades-old quoting bypasses pass the filter and get rewritten into the dangerous command at runtime. The load-bearing failure is conceptual, not incomplete: "adding more denylist patterns closes none of" the failure modes, because a string matcher cannot model bash expansion.

Preconditions / Affected

The realistic vector is prompt injection from operational context the agent ingests — poisoned README, Makefile target, shipped config, or malicious MCP server — not a direct malicious prompt (those are usually refused). Live runs used Claude Sonnet 4.6; the chain is model- and framing-dependent. Impact is execution under the user's full account authority: SSH keys, cloud credentials, everything in $HOME.

What to do

Match your defense to your actual runtime configuration:

  • Agent on host, real $HOME, non-disposable workspace (what most developers run): only Continue in its default IDE mode structurally closes the bypass surface. It is the one correctly implemented guard of the eleven.
  • Disposable workspace: a container sandbox is sound — but note some agents' sandbox "defends by default but fails under a documented and commonly used local-mode opt-out." Do not enable that opt-out.
  • Do not rely on the model itself as the boundary; treat any guard that string-matches raw commands as confidence without protection, and keep human-in-the-loop on rather than trusting the guard to permit auto-mode.

The four failure modes, so you know what you're holding:

  1. Guard exists and is defeated — Hermes, opencode (16/16 cases leaked), Goose (22/23).
  2. Tokenized guard that leaks on quoted substitution and destructive flags (two agents).
  3. No static guard at all.
  4. Sandbox with a local/auto opt-out.

Cline is opt-in and config-dependent: 2/13 cases leak in allow+deny mode vs 8/13 in deny-only mode — prefer the allowlist configuration.

Caveats

Scoring denominators vary by test applicability, not rigor: 13–23 cases per agent depending on which of the five bypass classes apply to that guard. "Every agent fails" is imprecise — one of eleven (Continue) defends by design. The two VS Code-extension agents were tested via a headless harness importing production controller modules unmodified, not the shipped binary.

Organisations named here

  • Antigravity command injection RCE
  • Claude Code deny-rule bypass
  • CrewAI agentic-framework RCE
  • GuardFall
  • TrustFall

Technologies named here

  • NousResearch/hermes-agent
  • Continue's five-stage evaluator
  • shell-quote
  • sst/opencode
  • block/goose
  • Semgrep
  • cline/cline
  • openhands-sdk LLM judge
  • GuardFall probe set / guard-evaluator test harness
  • RooCodeInc/Roo-Code
  • PatternSecurityAnalyzer
  • continuedev/continue
  • Aider-AI/aider
  • SWE-agent's interactive-program blocklist
  • plandex-ai/plandex
  • OpenInterpreter/open-interpreter
  • All-Hands-AI/OpenHands
  • SWE-agent/SWE-agent
  • Claude Sonnet 4.6
  • Claude Code
  • Cursor
  • Gemini CLI
  • GitHub Copilot CLI
  • GitHub Copilot agent mode
  • Windsurf
  • Google Antigravity
  • CrewAI
  • Continue
  • OpenCode
  • goose
  • Cline
  • Aider
  • Model Context Protocol

Techniques named here

  • GuardFall / Class A
  • GuardFall / Class B
  • GuardFall / Class C
  • GuardFall / Class D
  • GuardFall / Class E
  • Prompt injection via ingested content
  • Auto-execute / auto-yes flag abuse
  • Sandbox local-mode opt-out
  • Agent skill scanner bypass