
TL;DR
A vulnerability exists where a public Sentry key can be exploited to hijack AI coding agents like Claude Code, Cursor, and Codex. The attack, termed agentjacking, involves sending a fake error report to Sentry, allowing the attacker to execute code on the developer's machine without needing malware or stolen credentials.
✦ Why It Matters
Engineers must secure their Sentry keys to prevent unauthorized access and potential code execution vulnerabilities.
Key Takeaways
How It Works
The attack begins with an attacker finding a public Sentry DSN, which is designed to be exposed in frontend JavaScript. They then send a crafted error report to Sentry, which the AI agent reads as a legitimate instruction.
The agent executes the command embedded in the report, leveraging the developer's privileges, leading to potential exposure of sensitive data.
Related