Research·3 min read
By BitsMindsSource: Tenet Security

Agentjacking: A Fake Sentry Bug Can Hijack Claude Code

A new attack called agentjacking abuses public Sentry keys and MCP to feed AI coding agents fake bug reports that trick them into running attacker code. Researchers found 2,388 exposed orgs and an 85% success rate.

AGENTJACKING A forged bug report. A hijacked coding agent. FORGED SENTRY EVENT Resolution: npx evil-pkg --diagnose public DSN · no auth needed MCP AI CODING AGENT trusts the tool output runs $ npx evil-pkg reading AWS / GitHub keys exfiltrating credentials... developer privileges BITSMINDS.COM
Share:

Security researchers have disclosed a new class of attack that turns one of an AI coding agent's most useful habits — reading your error logs and offering to fix them — into a remote-code-execution backdoor. Dubbed "agentjacking" by the Threat Labs team at Tenet Security, the technique hijacks agents such as Claude Code, Cursor and OpenAI's Codex through the error-monitoring service Sentry — without any phishing, malware, or prior access to the victim's machine.

The attack abuses a piece of infrastructure that is public by design. Sentry's DSN — the credential apps use to report crashes — is a write-only key routinely embedded in front-end JavaScript, where anyone can find it via code inspection or internet-wide scans. An attacker simply POSTs a forged error event to that endpoint. No authentication bypass is required, because submitting errors is exactly what the key is for.

The payload is the trick. The fake event carries carefully formatted Markdown — a convincing "Resolution" section with a command to run. When a developer asks their coding agent to triage Sentry issues, the agent pulls the event in through Sentry's Model Context Protocol (MCP) integration and reads the attacker's instructions as trusted remediation guidance. It then runs the supplied command — typically an npx package — with the developer's own privileges, scanning the environment for AWS keys, GitHub tokens, Kubernetes credentials and SSH sockets and beaconing them back out. As Tenet put it, "the agent's trust in MCP tool responses creates a direct pathway from injected data to code execution."

The scope is what makes it alarming. Using only passive reconnaissance, the researchers — Ron Bobrov, Barak Sternberg and Nevo Poran — identified 2,388 organizations with injectable DSNs, including 71 in the Tranco top-million and a Fortune 100 company with a roughly $250 billion parent. In controlled testing across more than 100 organizations they logged over 100 real agent executions and an 85 percent success rate. Crucially, every step in the chain is authorized, so the attack sails past EDR, firewalls, WAFs and IAM, and prompt-layer guardrails failed — agents ran the payloads even when told to ignore untrusted data.

Tenet disclosed the issue to Sentry on June 3 and went public on June 17. Sentry acknowledged it the same day but declined a root-level fix, calling the behavior "technically not defensible" at the platform layer, and instead rolled out a global content filter to block known malicious strings. Tenet has open-sourced a hardening config it calls "agent-jackstop" for Cursor and Claude Code. The deeper lesson lands well beyond Sentry: any external data an agent ingests — logs, tickets, telemetry, web pages — is now an injection surface, and "ignore untrusted instructions" is not a control you can rely on. As coding agents gain hands on the keyboard, treating their tool outputs as untrusted input is becoming a baseline requirement, not a nicety.

More on Claude Code

Evergreen coverage we keep current — start here.

Want AI news before everyone else?

The morning's most important AI stories, straight to your inbox. No fluff.

Related Articles

Anthropic FlashProve Editorial illustration on a cream field: an ivory sheet printed with rows of token bars, like a model's reply, sealed with a large clay wax seal into which the Anthropic logo is pressed. The type column reads Anthropic research, FlashProve, proof of which model answered. An editorial metaphor for Anthropic's research prototype for cryptographic proofs of inference; it is not deployed in any product. RESPONSE · 1,024 TOKENS ANTHROPIC · RESEARCH FlashProve Proof of which model answered BITSMINDS.COM
Research

FlashProve: Anthropic Can Prove Which Model Answered

SemiAnalysis GDPx benchmark: best score 12% Editorial illustration on a deep petrol field: a tall glass measuring cylinder graduated from 0 to 100 holds a clay-coloured liquid only up to the 12 mark, with the Claude logo etched large into the empty glass above it. The type column reads GDPx benchmark, 12%, best score. An editorial metaphor for SemiAnalysis's leaderboard, where Claude Opus 5.5 leads with 12.0. GDPX BENCHMARK 12% best score BITSMINDS.COM 20406080100
Research

GDPx: SemiAnalysis’s New Agent Benchmark Tops Out at 12%

Google Project Suncatcher satellite Editorial illustration on a night-indigo field: a satellite with two blue solar wings floats above the curved blue limb of the Earth, lit by the sun from the upper right, with the Google G logo set on a white plate on its body. The words Project Suncatcher, TPUs and in orbit sit in the type column. An editorial rendering, not a photograph of the Suncatcher prototype. PROJECT SUNCATCHER TPUs in orbit BITSMINDS.COM
Research

Google Suncatcher Satellite Runs AI on a TPU in Orbit