Skip to content

About

Awesome list of attacks, advisories and defenses for AI coding agents (Claude Code, Cursor, Copilot, Codex, Gemini CLI) and MCP servers. Primary sources only.

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Awesome Coding Agent Security Awesome

How a trapped repository hijacks a coding agent: instruction files, autorun configuration and MCP servers lead to stolen tokens, then to the next repository.

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.

Contents

Why This List

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.

Incidents and Campaigns

  • Bitdefender: AI Agents Targeted Through Malicious GitHub Repositories - November 2026. 22 trapped repositories hide orders in AGENTS.md and CLAUDE.md and 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 SessionStart hook and a VS Code folderOpen task 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 nx versions 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-repository repositories created with the victims' own gh token.
  • 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.

Advisories by Tool

Fixed versions come from the vendor advisory. Update before opening untrusted code.

Claude 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 sed command 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 deny rules; no CVE.

Cursor

  • 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.

GitHub Copilot

  • CVE-2025-53773 - Embrace The Red, August 2025. Injected text makes Copilot set chat.tools.autoApprove in 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.

Gemini CLI

OpenAI Codex

Windsurf, Cline, Roo Code and Kiro

  • 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.

MCP Servers and Clients

  • CVE-2025-6514 - JFrog, 2025. mcp-remote runs 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-stdio starter 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.

Agent Frameworks

  • Prompts become shells - Microsoft, May 2026. Prompt injection to code execution in Semantic Kernel (CVE-2026-26030, CVE-2026-25592).

Attack Vectors

  • Poisoned instruction files - AGENTS.md, CLAUDE.md, GEMINI.md and .cursorrules are 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.json is run by the tool itself, with no model decision, once the folder is trusted.
  • Folder-open tasks - A .vscode/tasks.json task with "runOn": "folderOpen" runs in VS Code, Cursor and Windsurf when the folder opens.
  • Project MCP configuration - .mcp.json, .cursor/mcp.json or .codex/config.toml starts a local command presented as an MCP server.
  • Allowlist bypass - An approved command such as echo, sed, find or rg carries 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, --yolo or --trust-all-tools to 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.

Defenses and Settings

Tools

Repository and Account Scanners

  • 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.

MCP and Skill Scanners

  • 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.

Sandboxes

  • 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.

CI and Supply Chain

  • 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.

Research and Talks

If You Opened a Trapped Repo

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:

  1. Disconnect the machine from the network.
  2. Back up your data to an external drive, without configuration folders such as ~/.config and ~/.claude.
  3. Look for traces: ~/.claude/package/, ~/.codex/package/, unknown hooks in ~/.claude/settings.json, unknown user services.
  4. Reinstall the machine if any trace exists.
  5. From another, clean machine, revoke every token and key the infected machine could read.
  6. Check your repositories for commits you did not make and new public repositories you did not create.

Related Lists

Contributing

Contributions are welcome. Read the contribution guidelines first: every entry needs a primary source and a one-line description.

About

Awesome list of attacks, advisories and defenses for AI coding agents (Claude Code, Cursor, Copilot, Codex, Gemini CLI) and MCP servers. Primary sources only.

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors