Attacks, advisories and defenses for AI coding agents (Claude Code, Cursor, GitHub Copilot, OpenAI Codex, Gemini CLI, Windsurf, Cline, Kiro) and the Model Context Protocol (MCP) servers they run.
Opening a cloned repository with a coding agent can now be enough to run an attacker's code. This list keeps the primary sources in one place: incident reports from the teams that found them, vendor advisories, and the settings that stop each attack.
- Why This List
- Incidents and Campaigns
- Advisories by Tool
- Attack Vectors
- Defenses and Settings
- Tools
- Research and Talks
- If You Opened a Trapped Repo
General LLM security, jailbreaks and model safety are covered well elsewhere (see the related lists at the end). This list covers only the tools that read your repository, run shell commands and hold your tokens.
Every entry links to a primary source: the vendor advisory, the National Vulnerability Database (NVD) record, the original research or the official documentation. CVE numbers are checked on NVD before they are added, and each attack family sits next to the setting, sandbox or tool that blocks it.
- Bitdefender: AI Agents Targeted Through Malicious GitHub Repositories - November 2026. 22 trapped repositories hide orders in
AGENTS.mdandCLAUDE.mdand a hook in.claude/settings.json, then steal CI, cloud and package-registry tokens. - Miasma-family worm in testmetest npm packages - SafeDep, October 2026. Worm that steals credentials, commits poisoned agent configuration into victims' repositories and wipes the home folder when the stolen token is revoked.
- Shai-Hulud descendant in a RubyGem - Socket, November 2026. The same worm family spreads through RubyGems and poisons AI tool configuration.
- Mini Shai-Hulud targets AI coding agents - Sonar, May 2026. First npm worm to persist through a Claude Code
SessionStarthook and a VS CodefolderOpentask committed to the victim's branches. - Mini Shai-Hulud strikes again - SafeDep, 2026. Second wave, 317 npm packages compromised.
- Clone This Repo and I Own Your Machine - Mozilla 0DIN, June 25, 2026. A repository with no visible malicious file makes Claude Code open a reverse shell through a payload fetched at run time.
- Shai-Hulud npm worm - CISA alert, September 23, 2025. Self-replicating worm that compromised over 500 npm packages and published stolen secrets.
- s1ngularity: malicious Nx packages - Nx advisory, August 26, 2025. Malicious
nxversions ran local Claude Code, Gemini CLI and Amazon Q with permission checks disabled to search the disk for secrets. - s1ngularity impact analysis - Wiz, August 2025. Thousands of secrets leaked to public
s1ngularity-repositoryrepositories created with the victims' ownghtoken. - Amazon Q Developer extension 1.84.0 - AWS bulletin AWS-2025-015, July 2025. A prompt telling the agent to wipe local files and AWS resources was injected into the published VS Code extension.
- Rules File Backdoor - Pillar Security, March 2025. Invisible Unicode in Cursor and Copilot rules files makes the agent write backdoored code that reviewers cannot see.
Fixed versions come from the vendor advisory. Update before opening untrusted code.
- All Claude Code advisories - Vendor list, 36 advisories as of November 2026. The highest fixed version they require is 2.1.260 for the CLI.
- CVE-2025-59536 - Commands from project files ran before the trust dialog. Fixed in 1.0.111.
- CVE-2026-33068 - A settings file in the repository bypassed the trust dialog. Fixed in 2.1.53.
- CVE-2026-40068 - Trust dialog bypass through a spoofed Git worktree. Fixed in 2.1.84.
- CVE-2026-21852 - Repository environment configuration used before trust confirmation leaked data. Fixed in 2.0.65.
- CVE-2025-59041 - Code execution through a malicious
git config user.email. Fixed in 1.0.105. - CVE-2025-66032 - General command validation bypass leading to code execution. Fixed in 1.0.93.
- CVE-2025-64755 - A
sedcommand passed validation and wrote arbitrary files. Fixed in 2.0.31. - CVE-2026-25725 - Sandbox escape by injecting persistent configuration into
settings.json. Fixed in 2.1.2. - CVE-2026-55607 - Unsandboxed code execution through Git worktree path confusion. Fixed in 2.1.163.
- CVE-2026-88968 - Race in the Edit tool writes files outside the workspace. Fixed in 2.1.251.
- CVE-2026-54316 - Data exfiltration through the pre-approved Hugging Face domain in WebFetch. Fixed in 2.1.163.
- CVE-2026-86063 - Plugin commit SHA pin bypass installs attacker code. Fixed in 2.1.179.
- Deny rules skipped after 50 subcommands - Adversa AI, 2026. A long compound command silently disabled
denyrules; no CVE.
- All Cursor advisories - Vendor list.
- CVE-2025-54135 (CurXecute) - Prompt injection writes a new MCP configuration file without approval, which runs commands. Fixed in 1.3.9.
- CVE-2025-54136 (MCPoison) - Check Point, August 2025. An approved MCP configuration is swapped for a malicious one without a new prompt.
- CVE-2026-22708 - Allowlisted shell commands in Auto-Run mode deliver a payload through a poisoned environment. Fixed in 2.3.
- CVE-2026-50548 - Sandbox escape by overwriting the sandbox helper from the writable working directory. Fixed in 3.0.
- CVE-2025-53773 - Embrace The Red, August 2025. Injected text makes Copilot set
chat.tools.autoApprovein VS Code settings, then run commands. - CamoLeak - Legit Security, 2025. Hidden text in a pull request makes Copilot Chat leak private code through GitHub's Camo image proxy.
- CVE-2026-29783 - Copilot CLI runs commands hidden in bash parameter expansion without approval. Affects 0.0.422 and earlier.
- All Gemini CLI advisories - Vendor list.
- CVE-2026-12537 - A public issue drives the
run-gemini-clitriage action into running commands and stealing CI secrets. Fixed in 0.39.1. - Code execution through deception - Tracebit, July 2025. An allowlisted command prefix hides a second command from the user. Fixed in 0.1.14.
- CVE-2026-0755 - Command injection in the third-party
gemini-mcp-toolpackage.
- All Codex advisories - Vendor list.
- CVE-2025-61260 - Check Point, 2025. Codex CLI starts the MCP commands of a repository's
.codex/config.tomlwithout asking.
- CVE-2026-30615 - Windsurf. Attacker HTML registers a malicious STDIO MCP server with no click.
- SpAIware in Windsurf - Embrace The Red, 2025. Prompt injection stored in the agent's memory exfiltrates data in every later session.
- CVE-2026-44211 - Cline. Cross-origin WebSocket hijack. Affects 2.13.0 and earlier.
- CVE-2026-59723 - Cline. The Cline Hub dashboard server is reachable cross-origin. Fixed in 3.0.30.
- CVE-2025-53098 - Roo Code. The agent writes
.roo/mcp.json, which then runs commands. - AWS-2025-019 - Prompt injection issues fixed in Amazon Q Developer and Kiro.
- CVE-2025-6514 - JFrog, 2025.
mcp-remoteruns an OS command from a malicious authorization endpoint. Fixed in 0.1.16. - CVE-2025-49596 - Oligo, 2025. MCP Inspector had no authentication between client and proxy, so a web page could run code. Fixed in 0.14.1.
- CVE-2025-53109 and CVE-2025-53110 - Cymulate, 2025. Symlink and path-prefix escapes in the reference Filesystem MCP server.
- CVE-2025-68143 - Path traversal in the reference Git MCP server, with CVE-2025-68144 and CVE-2025-68145.
- CVE-2025-54994 - Command injection in the
create-mcp-server-stdiostarter kit. - CVE-2026-13341 - Indirect prompt injection in the Kong Konnect MCP server triggers unwanted API calls.
- CVE-2026-33032 - The nginx-ui MCP endpoints run commands without proper authentication.
- All reference server advisories - Vendor list.
- Prompts become shells - Microsoft, May 2026. Prompt injection to code execution in Semantic Kernel (CVE-2026-26030, CVE-2026-25592).
- Poisoned instruction files -
AGENTS.md,CLAUDE.md,GEMINI.mdand.cursorrulesare read as if the user wrote them, so a cloned repository can give orders. - Invisible Unicode - Tag and zero-width characters hide instructions that the model reads and the human does not.
- Autorun hooks - A hook in
.claude/settings.jsonis run by the tool itself, with no model decision, once the folder is trusted. - Folder-open tasks - A
.vscode/tasks.jsontask with"runOn": "folderOpen"runs in VS Code, Cursor and Windsurf when the folder opens. - Project MCP configuration -
.mcp.json,.cursor/mcp.jsonor.codex/config.tomlstarts a local command presented as an MCP server. - Allowlist bypass - An approved command such as
echo,sed,findorrgcarries a second command through shell syntax. - Tool poisoning and rug pulls - Invariant Labs, 2025. An MCP tool description hides instructions, or changes after the user approved it.
- Toxic agent flows - Invariant Labs, 2025. A public GitHub issue makes an agent with the GitHub MCP server copy private repository data into a public pull request.
- Exfiltration through allowed channels - Private data, untrusted content and any outbound channel together are enough to leak secrets.
- Agents launched by malware - Socket, August 2025. A malicious package runs the local agent with
--dangerously-skip-permissions,--yoloor--trust-all-toolsto do the search for it. - Agents in CI - A triage agent that reads public issues and holds CI secrets can be steered by any GitHub user.
- Claude Code security - Trust dialog, permission model and prompt injection safeguards.
- Claude Code permissions -
allow,askanddenyrules, and managed settings that users cannot override. - Claude Code sandboxing - Operating-system filesystem and network isolation for the Bash tool;
denyrules alone are not a security boundary. - Claude Code hooks -
PreToolUsehooks can block a command before it runs; review every hook a repository declares. - Claude Code development containers - Reference container with a default-deny firewall for untrusted code.
- Making Claude Code safer with sandboxing - Anthropic engineering, 2025. Why filesystem and network isolation must both be on.
- VS Code Workspace Trust - Restricted mode blocks tasks, debugging and workspace settings until you trust the folder.
- Secure development with AI in VS Code - Tool approval, auto-approve settings and MCP server trust for Copilot agent mode.
- Copilot coding agent firewall - Limit the outbound network access of the cloud agent.
- Cursor agent security - Auto-run, allowlists, MCP approval and the terminal sandbox.
- Codex security - Sandbox modes, approval policies and network access for Codex CLI and cloud.
- Gemini CLI sandboxing - Run tools in a container or macOS Seatbelt profile.
- MCP security best practices - Official guidance on confused deputy, token passthrough, session hijacking and local server compromise.
- GitHub Actions security hardening - Least-privilege tokens, pinned actions and untrusted input for workflows that run agents.
- npm trusted publishing - Publish from CI with OIDC instead of long-lived tokens that worms steal and reuse.
- medusa - Scanner that checks
.claude/hooks, permissions and editor AI files, including bidirectional Unicode. - agentshield - Audits agent configurations, MCP servers and tool permissions.
- shai-hulud-detect - Checks a local project's lockfiles and packages for known Shai-Hulud versions.
- Shai-Hulud 2.0 Detector - GitHub Action that scans npm dependencies for the Shai-Hulud 2.0 and ChainDrop campaigns.
- wormsign - Scans every branch of a GitHub account or organization through the API, without cloning, for autorun agent files, hidden payloads and backdated commits. New, by the maintainers of this list.
- agent-scan - Scans installed MCP servers and agent skills for tool poisoning and pins tool descriptions to detect rug pulls.
- mcp-scanner - Scans MCP servers for threats with rules and LLM analysis.
- skill-scanner - Scans agent skills before installation.
- SkillSpector - Detects prompt injection and malicious patterns in agent skills.
- AI-Infra-Guard - Red-teaming platform with MCP, skill and agent scans.
- sandbox-runtime - Filesystem and network restrictions for any process, without a container.
- claude-code-devcontainer - Isolated development container for running Claude Code on untrusted code.
- container-use - Gives each coding agent its own container and Git branch.
- closedbox - Runs Claude Code, Codex or any command in a closed box: it sees only the project, reaches only approved websites, never sees the API keys, and names the process behind every blocked connection. New, by the maintainers of this list.
- zizmor - Static analysis of GitHub Actions workflows: injection, unpinned actions, excessive permissions.
- harden-runner - Monitors and blocks network egress from GitHub Actions runners.
- GuardDog - Detects malicious PyPI and npm packages before installation.
- vet - Checks open source dependencies against malicious package data.
- IDEsaster - Ari Marzouk, December 2025. Over 30 issues in every AI IDE tested, built from normal IDE features such as workspace settings and remote JSON schemas.
- Agentic ProbLLMs - Johann Rehberger, 39C3 talk. Exploiting computer-use and coding agents end to end.
- The Month of AI Bugs - Embrace The Red, August 2025. One disclosed agent vulnerability per day.
- Pwn2Own Berlin 2026, day one - First contest with a coding agent category; OpenAI Codex exploited, Claude Code collisions with known bugs.
- Pwn2Own Berlin 2026, day two - Cursor fully exploited.
- Pwn2Own Berlin 2026, day three - OpenAI Codex exploited again; more Claude Code collisions.
- Context Privilege Escalation Attacks against AI Agent Harness - arXiv, 2026. How content in the agent's context gains privileges it should not have.
- When Attacker-Controlled Hook Updates Steer AI Agent Harnesses - arXiv, 2026. Abuse of hook updates to steer agents.
- How User Invocation Shapes Coding Agent Vulnerability to Repository Poisoning - arXiv, 2026. How the way an agent is started changes the success of poisoned repositories.
- MOSAIC - arXiv, 2026. Composing harmless-looking CLI commands into an attack on coding agents.
- Isolation, Access Control and TOCTOU Vulnerabilities in AI Coding Agents - arXiv, 2026. Survey of execution security research for coding agents.
- OWASP Top 10 for Agentic Applications - OWASP GenAI Security Project, 2026 edition.
- Simon Willison on prompt injection - Long-running notes on prompt injection and agent design.
- Mindgard AI IDE vulnerability patterns - Catalog of recurring vulnerability patterns across AI IDEs.
Some worms install a wiper that deletes your home folder as soon as the stolen token stops working. Revoking first can destroy your data. The full guide gives the safe order:
- Disconnect the machine from the network.
- Back up your data to an external drive, without configuration folders such as
~/.configand~/.claude. - Look for traces:
~/.claude/package/,~/.codex/package/, unknown hooks in~/.claude/settings.json, unknown user services. - Reinstall the machine if any trace exists.
- From another, clean machine, revoke every token and key the infected machine could read.
- Check your repositories for commits you did not make and new public repositories you did not create.
- Awesome MCP Security - MCP security resources.
- Awesome LLM Security - Tools, documents and projects about LLM security.
- Awesome AI Security - AI security resources in general.
- Awesome AI Security Tools - Tools for AI security and AI-assisted security.
- Awesome Prompt Injection - Prompt injection resources.
- Awesome Claude Code - Claude Code resources in general.
Contributions are welcome. Read the contribution guidelines first: every entry needs a primary source and a one-line description.
