Overview

AI agent security encompasses threats and defenses specific to autonomous AI coding and agent workflows — a rapidly emerging attack surface in June 2026.

Timeline

Key Threats

GuardFall (June 2026)

  • Pattern-based shell guards approve raw text; Bash rewrites before execution
  • Poisoned READMEs/Makefiles in CI with auto-yes modes enable credential exfiltration
  • Distinct from TrustFall (MCP trust) and Mozilla 0DIN (DNS TXT injection)
  • Mitigations: disable auto-exec, block fork PRs, scope $HOME, canonicalize-before-guard (Continue model)

Agentjacking (June 2026)

MCP Auto-Execution (June 2026)

  • amazon-q-developer loads .amazonq/mcp.json without consent — systemic pattern (Claude Code, cursor, Windsurf CVEs)
  • Self-hosted langflow RCE via public flow build endpoint — AI infrastructure as attack surface

Supply Chain via Agents

  • AI coding tools auto-execute malicious repo configs (miasma-worm)
  • Compromised npm packages trigger on repo open in agents

Prompt Injection

  • Indirect injection via web pages, documents, MCP tool responses
  • lockdown-mode restricts outbound paths but does not block injection into context

Defenses

  • Runtime execution controls: Intercept tool calls before execution; require human approval for shell/package commands
  • MCP trust model: Treat all MCP tool output as untrusted input
  • Least privilege: Restrict agent terminal, file system, and network permissions
  • Supply chain: npm v12 allowScripts allowlists; credential rotation
  • lockdown-mode for outbound restriction in ChatGPT

Key Players

Sources