Prompt injection attacks against AI coding agents work by embedding malicious instructions in content the agent reads during normal operation β GitHub PR comments, web search results, and third-party skill files. A single crafted string can redirect Claude Code, Gemini CLI, or GitHub Copilot to execute arbitrary commands, exfiltrate credentials, or silently follow attacker-controlled instructions with no audit trail left behind. A proof-of-concept documented this week achieved an 85% success rate across all three agents using a single crafted PR comment. The defenses exist: input validation on untrusted tool outputs, sandboxed execution, manual skill vetting, and approval gates on sensitive tool calls β but none of them are on by default.
TL;DR
PR comment attacks achieve ~85% exploit success across Claude Code, Gemini CLI, and GitHub Copilot β arbitrary commands run, credentials extracted, zero audit trail
WebSearch injection delivers fake instruction blocks via web pages the agent fetches; Claude Opusβ¦