Skip to content

All posts

IT security, AI agents, Incident response

Agent traces as training data: how API keys end up at the AI service provider

On November 13, Cursor disclosed how the tampered Claude Code extension got into its marketplace: through coding agent traces with unredacted credentials that sat with its service provider Fireworks AI as training data. Notion reports API keys in AI chats exposed through the same provider. What this means for agent sessions, training settings and secrets in your own organization.

As of November 16, 2026, 7:55 a.m. CET. This piece is based on the reports from Cursor (November 13), Fireworks AI (November 9) and Notion (November 12 and 13). Fireworks does not name any customers in its bulletins.

Disclosure: We researched this piece with Grok Bot, an AI assistant that Cursor lists as one of its own products. In its report, Cursor counts Grok Bot among the products not affected by the incident. In other words, we work with tools from the vendor whose incident we are writing about.

The session has been running for an hour. The coding agent is supposed to find out why the deploy fails, and the developer copies the token from the password manager into the chat window so it can do that. The agent finds the bug, the ticket is closed. After that, the token sits in the session history. This history is called a trace: it records the inputs, the responses and the steps the agent carried out. Where it goes next is decided by a setting in the tool and by the vendor’s contracts with its service providers.

At Cursor, a widely used AI code editor, exactly this kind of history became the way in. On October 29, a tampered copy of Anthropic’s Claude Code extension, versions 2.1.312 and 2.1.313, sat in Cursor’s extension marketplace for about eleven hours. On November 13, Cursor described how it got there in an incident report. According to Cursor, the path started at Fireworks AI, the service provider Cursor used to train and run models.

From the training bucket to the marketplace

Cursor had issued Fireworks an access key for a storage bucket that Fireworks could only read from. Cursor used this bucket to share data with the provider. According to Cursor, Fireworks exposed the key, an attacker obtained it and copied data from the bucket. It held coding agent traces, mostly from 2025, from sessions without Privacy Mode. These are the sessions that Cursor may use to train its models under its data use rules. A small number of these traces contained credentials that had not been redacted. Cursor puts it in numbers: less than 0.01 percent of customers had API credentials exposed, and less than 0.05 percent of users had traces exposed.

With these credentials, the attacker got into SaaS tools that Cursor uses internally. From there, according to the report, the attacker reached archived non-production source code repositories, support requests and emails, usage metrics and contact details, summaries of agent conversations, and credentials that users had sent to Cursor’s support team. Using a credential from this data, the attacker placed the tampered builds on October 29 directly on the cache from which Cursor serves its marketplace. According to Cursor, at most 5,000 users may have received them. Among other things, the builds added a foreign SSH key to the machine, as described in Cursor’s first security notice and in an analysis by Microsoft.

According to Cursor, the following were not affected: the production systems, the Cursor app and its official updates, which ship from a separate code hosting system, the release signing keys, the other extensions and customers’ code repositories. Cursor last saw attacker activity on November 1, and it was blocked. Cursor has moved all inference away from Fireworks, deactivated the key, rotated all internal credentials, expanded network restrictions at its service providers so that stolen credentials only work from their intended location, and extended secret scanning to further internal data sources.

The bucket was meant for training data. Because of the unredacted credentials, it was a store of keys for the attacker, and that store sat with a third party.

Same provider, a second customer

Notion also lost data through the same provider. On November 12, Notion published a security advisory. Notion used Fireworks as an inference provider for open-weight models and for classification jobs in Insights, a feature that shows administrators how their team uses Notion AI. On November 2, Fireworks reported a first access to data that, according to Notion, was only synthetic test data. By the morning of November 3, Notion had cut all connections to Fireworks, and on November 4 it deleted its data there. On November 6, Fireworks reported that customer data might also be affected, and on November 8 it named the final dataset: Notion AI chat transcripts used for Insights, in less than one percent of workspaces. According to Notion, most of them were not attributed to any user or workspace. On November 11, Notion revoked its own API keys that it found in the affected messages, and on November 12 it reported third-party API keys from these messages to the providers that had issued them. Notion advises affected customers to rotate passwords, API keys and other credentials they pasted into Notion AI during the period in question.

Fireworks itself has published two security bulletins. On October 6, the provider discovered that an unauthorized party was using internal credentials and had read environment variables from evaluation jobs in some customer accounts, including API keys and tokens. In its update of November 9, Fireworks describes a second route: a cloud provider hosting Fireworks development machines had its own incident on October 23, and on October 24 the attacker used it to reach Fireworks development machines. According to Fireworks, billing data, metadata and, for some customers, datasets and incomplete model weights were affected. Fireworks says the evidence points to a financially motivated group that resells stolen access to language models. This business is known as LLMjacking, and we described it in our piece on secrets at PaaS providers. Neither Fireworks nor Cursor says which of the two routes affected Cursor’s key.

Both vendors had rules about which data goes to the provider. Cursor only passed on traces from sessions it was allowed to use for training. Fireworks says its inference, training SDK and its product Nexus do not retain data by default, and that it found no impact there. The data that leaked sat with the provider as datasets because the customers had handed it over for training or analysis. An opt-in rule decides which sessions go to the provider. It does not govern what those sessions contain. This can happen to any vendor that passes session data on for training or analysis, including one that takes data protection seriously.

What sits in traces in your own organization

If your developers work with Cursor, GitHub Copilot, Claude Code or an internal agent platform, you have traces in several places: at the tool vendor, in your own observability stack if the team logs agent runs, and in support tickets when someone reports a bug with a copied session history. Each of these places can pass data on to subprocessors. Cursor’s report shows that support is a store of credentials too.

Anyone who installed or updated the Anthropic.claude-code extension to version 2.1.312 or 2.1.313 from the Cursor marketplace on October 29 should follow the steps in Cursor’s security notice. According to Cursor, uninstalling the extension alone is not enough. Anyone notified by Cursor or Notion should rotate the keys named in the notice. For everyone else, these checks are the core:

  1. Set the training setting for each tool. For every AI tool, decide whether sessions may be used for training or analysis, and enforce that centrally. In Cursor the setting is called Privacy Mode. According to its security page, team and enterprise admins can set it, and new team members inherit the team’s setting. Private accounts that someone uses to work on company code are not covered.
  2. Do not show agents long-lived keys. Whatever the agent sees ends up in the trace. Issue short-lived tokens with narrow permissions for tests, fetch secrets from the secrets manager at runtime and keep .env files out of the agent’s context.
  3. Scan your own traces. Check agent logs, observability stores, ticketing systems and support mailboxes with the same secret scanner you use on your Git repositories. Cursor extended its scanning to internal data sources after the incident. Every hit gets revoked with the issuing provider.
  4. Ask the vendor. Which subprocessors receive session data for training, evaluation or analysis, how long does it stay there, with which access does the provider fetch it, and does that access only work from specific networks? The answers belong in the vendor assessment.
  5. Rotate whatever was in the chat. Notion’s advice applies to every tool: credentials that someone pasted into an AI chat or an agent session count as exposed.

What is still open

Cursor writes that the credentials in the traces had not been redacted. Whether and how Cursor cleaned traces before passing them on is not in the report. None of the parties describes how Fireworks exposed the key. Whether other Fireworks customers lost training or analysis data containing credentials is not publicly known.

An agent trace contains everything the agent has seen. Whoever releases traces for training passes that content on to service providers whose security they cannot verify. That is why credentials do not belong in agent sessions, the training setting is decided at company level, and every secret that still ended up in a trace gets rotated.