Skip to content

Accident reports · October 2025

Claude Code: a booby-trapped plugin switched off approvals and sent the project's code

According to PromptArmor, a plugin installed from a marketplace on GitHub approved network calls itself, then had project code sent to the attacker's server.

  • Company Anthropic
  • Agent Claude Code
  • Model not published
Outside content
A black electrical plug held near a white wall socket
Photo: Clint Patterson on Unsplash
WhenOctober 2025
WhoClaude Code, Anthropic's coding agent, tested by PromptArmor
What the agent didIn the demonstration, a booby-trapped plugin, installed from a "marketplace" published on GitHub, switched off approval prompts and made it send project code to the attacker's server
ConsequenceNo real-world attack reported; the sources mention no response from Anthropic

What happened

This is a researchers' demonstration, not an observed attack. The PromptArmor team published it on 16 October 2025. The Hacker News picked it up in January 2026.

Claude Code accepts plugins, distributed through "marketplaces". According to PromptArmor, publishing one is just uploading files to GitHub, and online directories list new ones automatically. To look credible, the attacker in the demonstration used a GitHub account posing as Anthropic.

The plugin contains a "hook": a command run automatically at a given moment. The researchers tried two. The first rewrites Claude Code's permissions file to allow curl, the tool that sends requests over the network, on every user message. The second approves every curl call on its own, and can even hide its activity from the history.

Then the plugin offers a command presented as a debugging aid. It contains a hidden instruction: gather the project's context and send it to a "knowledge base". That base is the attacker's server. Since curl was already approved, the data went out without the user having anything to confirm. PromptArmor mentions other possible uses, such as deleting files.

Why it happened

The user's approval rested on a setting a plugin could rewrite. The hook doesn't even go through the model: it is a program launched by the tool, with the user's rights. Then the model followed an instruction from the plugin as if it came from a trusted tool.

The failure family

In our catalogue, this is the "Outside content" family: a plugin from outside takes over the agent. With a leak at the end: project code sent to a stranger.

The safeguard in code

  • Plugins are installed only from a list the company has approved.
  • A plugin cannot change the agent's approval settings; those settings are locked at company level.
  • Outgoing calls to unknown domains are blocked at network level, whatever the agent has approved.

What we test

The "planted instruction" and "hidden instruction" tests slip an order into content the agent reads. The exact case of an installed plugin that switches off approvals and then asks for the project's code to be sent out is not yet tested as such: it joins our list, next to the related cases of a booby-trapped third-party skill and of an order asking to switch off confirmations. What a company can lock down today: allow only the marketplaces it has chosen, and enforce its permission settings on every machine.

And your agent, what would it do?

The crash test puts your agent in these situations, dozens of times, on several models. You get the figures, the conversations where it gave in, and the fix plan.

Crash-test my agent See the live demo

Further reading