Agentic AI
Agentjacking: How Stolen Sentry Keys Can Hijack AI Code Agents
Researchers document a new attack class that weaponizes public error-monitoring credentials to inject malicious commands into Claude, Cursor, and Codex.
The New Stack
Security researchers at Tenet Security have documented a novel attack called "agentjacking" that exploits a dangerous gap between how AI coding agents trust external data and how Sentry's error-monitoring service was designed.
The attack works because Sentry DSN (Data Source Name) credentials are intentionally public—they're designed to be safe in JavaScript. But when an AI agent reads crafted error reports from Sentry, it cannot distinguish data from instructions. An attacker who finds a public DSN can inject a fake error report containing a disguised command, and the agent will execute it on a developer's machine with full privileges.
How the Attack Unfolds#
The kill chain is straightforward:
- Find the DSN — Search GitHub or use Censys to discover public Sentry credentials
- Craft a fake error — Post a malicious event to Sentry's ingest endpoint (no auth required beyond the DSN)
- Hide the payload — Embed an attacker-controlled command in markdown rendered as a legitimate error resolution
- Trigger the agent — Developer asks the agent to fix unresolved Sentry issues (a routine task)
- Execute with stolen privileges — Agent runs the command, exposing environment variables, AWS keys, GitHub tokens, and credential stores
As one researcher put it, it's like "a forged repair note slipped into a building's work-order system"—the contractor trusts the system and never asks who filed it.
Scope of the Vulnerability#
Tenet's controlled validation found:
- 2,388 organizations with injectable DSNs discoverable through passive reconnaissance
- 71 of those rank in the Tranco top-1M busiest sites
- 100+ confirmed executions across separate organizations using Claude Code, Cursor, and Codex
- 85% success rate in controlled tests
- Successful exploitation inside a Fortune 100 company, CI/CD pipelines, WSL environments, and behind corporate VPNs
One captured environment held a live AWS secret access key and identifiers for other connected agents, creating a cascade of potential breaches.

