A generated abstract illustration on a deep navy field with a faint blueprint grid. At left, a tall narrow vertical column is built from thin pale-cyan horizontal scan lines, like a stack of records in a terminal pane; one line near the middle glows warm amber. A fine dotted cyan arc lifts that amber segment out of the column and carries it right, into a large dark angular block whose hinged panel stands open at an angle, amber light leaking from the opening. A pale dotted rectangle traces a boundary around the block that the arc has already crossed. No text, digits, people, brand marks or organisation logos appear. The OrcaRouter logo is composited in the bottom-right corner.
AI Safety Incidents

Agentjacking: a public Sentry DSN let fake error reports hijack Claude Code, Cursor and Codex

Author

jinhao.song

Date Published

Latest models · 20View all models →
Benchmarks: Artificial Analysis · updated daily
Back to all posts

In the second week of June 2026 — 12 June, by the archive's dating — Tenet Security's Threat Labs published research it calls agentjacking. The claim is narrow and unpleasant: a Sentry DSN is a write-only credential that Sentry documents as safe to embed in front-end JavaScript, and anyone holding one can POST an error event that Sentry files next to the application's real crashes. When a developer later asks an AI coding agent to clear the unresolved Sentry issues, the agent pulls that event back over the Model Context Protocol and cannot tell the attacker's text from the product's own remediation guidance — so it runs the attacker's npm package with the developer's own privileges. Tenet says it found 2,388 organisations with injectable DSNs and that it ran the attack against more than 100 of them in a controlled campaign, where Claude Code, Cursor and Codex executed its test payload at a rate of 85%. By the company's own account nothing was breached and no real credential was kept. The record's full source list, severity grade and confidence assessment sit in the AI incident archive, alongside the neighbouring MCP and prompt-injection entries filed around it.

What the attack actually does

A DSN — Data Source Name — is not a secret by design. Sentry requires customers to ship it inside client-side JavaScript and mobile binaries so that crash reports reach the collection endpoint from end-user devices, and it has to stay readable for the product to work. That decision was reasonable while the only reader was a human looking at an error dashboard. The research argues it stops being reasonable once an agent reads the same dashboard on the developer's behalf.

Tenet's chain has six stages, each of which is a normal operation for every party involved:

• Find a DSN. Tenet lists three discovery routes: reading the JavaScript served by any website, a Censys search for the ingest hostname in HTTP response bodies, or GitHub code search.

• Post an error event. The attacker sends a crafted event to Sentry's ingest endpoint. No authentication beyond the DSN is required, and the attacker controls the whole payload — message, tags, context keys, extra data, breadcrumbs and stack trace. Sentry answers HTTP 200 and processes it exactly as it would a real crash.

• Disguise the instruction as a resolution. The message and context fields carry markdown formatted to render as headings, code blocks and a fabricated resolution section that matches Sentry's own template. Inside that section sits an npx command.

• Steer the agent. A developer asks their coding agent to fix the open Sentry issues. That is the entire trigger; nobody is phished and nobody approves anything.

• Run the command. The agent executes the npx call, the package downloads from the public npm registry, and it runs with the developer's full privileges.

• Reach the secrets. In Tenet's test the package confirmed that environment variables existed, probed the sizes of the AWS config, npm and Docker credential files, checked network interfaces for a VPN, and signalled a Tenet-controlled server.

An HTML diagram card titled 'Six stages, none of them unusual', subtitled 'Every action in the chain is one the developer or the agent is entitled to take, which is why no control along it fires.' Six numbered rows, each naming a stage, describing it, and labelling who performs it. Stage 1, Find the DSN, attacker: read it out of page JavaScript, query Censys for the ingest host, or search GitHub code. Stage 2, Post one error event, attacker: no authentication beyond the DSN; Sentry answers HTTP 200 and files it beside real crashes. Stage 3, Hide a command in it, attacker: markdown in the message and context fields renders as a fake resolution section holding an npx command. Stage 4, Ask the agent to triage, developer: the developer asks the coding agent to clear open Sentry issues. Stage 5, The agent runs it, agent: the package pulls from the public npm registry and executes with the developer's privileges. Stage 6, It reports back, agent: environment variables, AWS, npm and Docker credential files and VPN interfaces are probed and beaconed out. A footer cites Tenet Security Threat Labs, June 2026, cross-checked against The Hacker News, 12 June 2026.

What Tenet says it found

The headline number is 2,388 organisations with valid injectable DSNs, gathered by passive reconnaissance rather than by touching any of them — Censys indexing, code search and CDN loader extraction. Seventy-one of those organisations rank inside the Tranco top one million. Tenet is explicit that 2,221 of the 2,388 were never tested at all; they are an exposure count, not a victim count.

Against the remainder it ran what it describes as controlled validation waves. The company says more than 100 agents acted on the injected errors across separate organisations, with an 85% exploitation success rate, spanning four or more agent families and macOS, WSL on managed Windows, Docker containers, a CircleCI pipeline on an EC2 container and agents sitting behind corporate VPNs. One capture it publishes is a Claude Code environment holding a live AWS secret access key; another is a sandboxed Codex agent in CI whose own environment carried CODEX_SANDBOX_NETWORK_DISABLED, which did not stop it, because the payload arrived through data the agent had been asked to read rather than through the network. The build used in the Claude Code capture is recorded as 2-1-161, current at the time, captured 2 June 2026.

The single most dramatic claim is also the least checkable: Tenet says one of the machines belonged to a developer inside a $250 billion Fortune 100 technology company, and declines to name it. The published evidence pack redacts project identifiers, hostnames and every credential value at pixel level.

An HTML card titled 'The numbers Tenet published', subtitled 'Every figure below is the researching company's measurement of its own campaign. None has been independently verified.' Four tiles reading: 2,388 organisations with a valid, injectable Sentry DSN; 71 of them inside the Tranco top one million; 100+ confirmed agent executions during testing; 85% exploitation success rate across the test waves. An amber note beneath reads: 2,221 of the 2,388 were never tested, so they are an exposure count, not a victim count. A line below reads that four or more agent families acted on the payload, including Claude Code, Cursor and Codex, across macOS, WSL on managed Windows, containers, a CircleCI pipeline and agents behind corporate VPNs. A footer cites Tenet Security Threat Labs, The Hacker News, The New Stack and the Cloud Security Alliance research note.

What is established, and what rests on one company's logs

The mechanism is documented in enough detail to be checked, and the design facts underneath it are not in dispute: Sentry DSNs are public by design, the ingest endpoint accepts events on the strength of the DSN alone, and the Sentry MCP server returns those events to an agent as tool output. Nothing in Sentry's reported response disputes any of that. Tenet's disclosure to Sentry on 3 June 2026 and Sentry's same-day acknowledgement are reported consistently across every account of the episode.

Everything with a number attached is Tenet's own measurement of Tenet's own campaign. The 100-plus executions, the 85% rate, the classification of the target environments and the $250 billion employer all come from one set of capture logs that no outside party has audited, and the individuals and companies involved are unnamed or redacted. The New Stack, reporting the research on 21 June, put the caveat plainly: Tenet sells the runtime defence its conclusion calls for, so the figures are best read as the company's own controlled test results rather than as independent measurements. The Cloud Security Alliance's research note on the finding, dated 12 June, likewise describes the work as proof-of-concept and controlled testing rather than confirmed exploitation at scale.

That distinction is the one most retellings lose. There is no evidence in any of the sources that an attacker has used this against a real organisation outside the research, and the archive records the incident as no real harm. There is also no CVE: the finding is an architectural class, not a patchable bug in a product, and no vendor assigned an identifier.

An HTML card titled 'Established, and not', split into two columns. The left column, headed ESTABLISHED, lists: Sentry DSNs are public by design and the ingest endpoint accepts events on the strength of the DSN alone; the Sentry MCP server returns those events to an agent as tool output; Tenet disclosed to Sentry on 3 June 2026 and Sentry acknowledged the same day; 2,388 organisations were found holding injectable DSNs by passive reconnaissance; the mechanism is reproducible from the published write-up. The right column, headed NOT ESTABLISHED, lists: that any organisation outside the research campaign was ever attacked; the 100-plus executions and the 85% rate, which rest on logs no outside party has audited; the identity of the 250 billion dollar Fortune 100 target, which Tenet withholds; any independent measurement of the success rate; any CVE or patched version, since none exists and this is an attack class rather than a product bug. A footer cites Tenet Security Threat Labs, The Hacker News, The New Stack and the Cloud Security Alliance research note.

Sentry's answer

Tenet disclosed the chain to Sentry on 3 June 2026 and says the company replied the same day, acknowledging the issue and declining to fix it at the root. The phrase attributed to Sentry in every account — Tenet's blog, The Hacker News, The New Stack, VentureBeat and the Cloud Security Alliance note — is that the attack is "technically not defensible" at the platform level, with the argument that model vendors run middleware against it instead. During the research period Sentry activated a global content filter blocking the specific payload string used in Tenet's proof of concept. That stops the demonstrated string; it does not close the path, because the ingest endpoint stays open by design and a different payload is a different string.

One gap is worth stating rather than papering over: no first-party Sentry statement on agentjacking could be located for this article. The company's position is known only as Tenet reports it and as four other publications and the Cloud Security Alliance repeat it, and repetition of a paraphrase is not confirmation that it was said in those words.

Why no security control fired

The reason this is not an ordinary prompt injection is that every step is authorised. The developer's agent uses the developer's credentials to run a package manager against a public registry, on a machine it is entitled to act on, following a workflow the developer initiated. Tenet calls this the Authorized Intent Chain. Endpoint detection sees a trusted process doing normal work, a web application firewall sees outbound package traffic, IAM confirms the identity was permitted, and a VPN terminates nothing unusual. The Cloud Security Alliance note makes the same point from the defender's side, and adds the partial exception: user and entity behaviour analytics watching for mass secrets access, or data loss prevention catching unexpected credential egress, may surface something in organisations with fine-grained baselines.

Tenet also reports that prompt-layer defences failed. Agents in its tests ran the payload even when system prompts and skills instructed them to treat tool output as untrusted data. That is the load-bearing claim for the article's conclusion — if it holds, the failure is in how models separate data from instruction and cannot be configured away; and it is, again, Tenet's observation of Tenet's payloads.

What was done about it

Tenet released agent-jackstop, a set of drop-in configuration files for Cursor and Claude Code intended to harden them against this class of injection. The Cloud Security Alliance's note recommends the steps a team can take without waiting for either vendor: inventory which MCP servers are wired into coding agents, disable the Sentry integration where it is not operationally needed, require explicit human approval before an agent executes any command or installs any package sourced from tool output, and route client-side error reporting through a server-side relay so that the DSN is not published in the first place.

The generalisation is the part that outlasts the specific finding. Any MCP integration that surfaces externally influenced content to an agent — issue trackers, ticketing systems, support queues, code review, log aggregation — carries the same shape, because the trust boundary is between the data source and the agent, not between the agent and the MCP server's own code. VentureBeat made that list explicit on 29 June, naming Datadog, PagerDuty and Jira among services with comparable exposure. Those are analytical parallels from the reporting, not demonstrations; only Sentry was tested.

How the dates line up

• 2 June 2026 — the Claude Code build recorded in Tenet's capture, logged as 2-1-161.

• 3 June 2026 — Tenet discloses the chain to Sentry; Sentry acknowledges the same day.

• 11 June 2026 — Infosecurity Magazine carries the first press report, quoting Tenet's blog post.

• 12 June 2026 — The Hacker News publishes its account, and the Cloud Security Alliance dates its research note to the same day. This is the date the archive records.

• 17 June 2026 — the version of Tenet's write-up now online carries this date, with its validation section marked as updated.

• 21 June and 29 June 2026 — The New Stack and then VentureBeat publish longer analyses; VentureBeat is where the Datadog, PagerDuty and Jira comparison is drawn.

Nothing in that sequence changes the substance of the finding, but the spread matters for anyone reading the coverage in order: the earliest reports ran before the evidence pack was final, and the later ones are commentary on Tenet's write-up rather than separate reporting of the attack.

What to take from it

Agentjacking is a well-documented research finding with a reproducible mechanism and an unusually clear architectural story, and it is not a breach. The organisations that appear in its headline number were counted, not compromised; the ones that were actually tested were tested by a security vendor that self-identified in every payload with a header marking it a responsible-disclosure scan, that kept no data, and that had a commercial interest in the conclusion. Those facts are all in the primary source, which is more than most incident coverage can say — and they are also the reason the finding should be read as a demonstration of a live design flaw rather than as a breach report.

The part that does not depend on Tenet's numbers is the design question. A credential that is safe to publish becomes unsafe the moment an agent with shell access reads what it writes. That is a change in the reader, not in the credential, and it will apply to the next observability platform wired into the next coding agent just as it applies to this one.