arrow_backBack to Blog
securityagentscodingvulnerabilitysupply chain

Agentjacking: New Attack Exploits Claude Code, Cursor and Codex with 85% Success Rate

personLab Desenvolvimento
schedule4 min

A new attack dubbed "Agentjacking" is exploiting coding AI agents like Claude Code, Cursor, and Codex with an alarming 85% success rate.

The attack works by feeding fake Sentry errors to the agents. Since AI agents are trained to trust observability tools and act on bug reports, they execute malicious code disguised as fixes without questioning the source.

How it works

  1. The attacker plants a fake Sentry error in a repository or CI/CD pipeline
  2. The AI agent (Claude Code, Cursor, Codex) detects the error and attempts to fix it
  3. The suggested fix includes malicious code that compromises the system
  4. The developer or pipeline approves the fix trusting the agent’s recommendation

The vulnerability exposes a fundamental security problem in the age of AI agents: the level of trust developers place in AI-suggested fixes. While a human would verify the origin of a bug report, AI agents tend to take information at face value.

Security researchers recommend being skeptical of unexpected Sentry errors and always manually reviewing AI-suggested fixes before applying them.

Source: BuildFastWithAI, security research