Cursor Security Incident: How Agent Traces Leaked Keys, and What Secret Scanners Miss

The Cursor security incident began with coding-agent traces holding unredacted keys. We tested whether gitleaks and TruffleHog would have caught them first.

Updated November 16, 2026. Based on Cursor’s November 13 incident update, Fireworks AI’s two bulletins, and our own scanner test run on November 16 with gitleaks 8.30.1 and TruffleHog 3.99.9.

The Cursor security incident started with data most engineering teams never think of as a secret store: coding-agent traces. In its November 13 incident update, Cursor says an attacker used a Cursor-issued access key that was exposed at Fireworks AI, its training and inference vendor, to copy historical agent traces, found unredacted API credentials in a small number of them, and used one stolen credential to plant a tampered Claude Code extension on Cursor’s marketplace cache on October 29, 2026.

Teams running coding agents should treat every trace export as a credential store: scan it, redact it, and rotate anything that lands in it before the data leaves for a vendor. In our November 16 test, two standard secret scanners caught 8 of 10 fake credential types in a trace stored as a log, a JSONL span, or base64, and caught none when the same keys were split across streamed model output. That gap is the practical lesson for anyone sharing traces for training or evaluation.

TL;DR

  • Cursor says the attacker copied a read-only bucket of coding-agent traces, mostly from 2025 and only from sessions not in Privacy Mode, that Cursor shared with Fireworks AI for model training.
  • Fewer than 0.05% of users had traces exposed and fewer than 0.01% of customers had API credentials exposed, according to Cursor’s November 13, 2026 update.
  • A credential from that data let the attacker place tampered Anthropic.claude-code 2.1.312 and 2.1.313 builds on Cursor’s marketplace cache for about 11 hours; up to 5,000 users may have received them.
  • In our test, gitleaks 8.30.1 and TruffleHog 3.99.9 each found 8 of 10 fake credential types in log, JSONL, and base64 traces, and 0 of 10 when the keys arrived as streamed deltas.
  • OpenTelemetry’s OpenAI instrumentation does not capture message content by default, while Langfuse masking and LangSmith anonymizers are hooks you must turn on yourself.

What Happened in the Cursor Security Incident

The Cursor security incident was a vendor-side credential exposure that turned into a software supply chain attack. Cursor says an attacker obtained an access key Cursor had issued to Fireworks AI, used it to read a shared storage bucket of coding-agent traces, and pivoted from credentials found in those traces into internal SaaS tools and, later, the extension marketplace cache.

From those SaaS tools, the attacker reached archived non-production source repositories, limited customer support data and email conversations, product usage metrics and contact details, summaries of some coding-agent conversations, and credentials that users had sent to Cursor support. Cursor says its production systems, official app updates, customer code repositories, and prompts and code from Privacy Mode sessions were not affected, and that no release signing keys were exposed.

Cursor incident update explaining that an access key issued to Fireworks exposed coding agent traces with unredacted credentials
Cursor’s November 13, 2026 update traces the attack to a vendor key exposed at Fireworks and to credentials that had not been redacted from shared coding-agent traces. Image: Cursor, captured November 16, 2026.

The visible damage came on October 29. Using a stolen credential, the attacker placed unauthorized copies of Anthropic’s Claude Code extension, versions 2.1.312 and 2.1.313 for Windows and macOS, on the cache that serves Cursor’s VS Code extension marketplace. Cursor’s security notice says the builds tried to add an attacker SSH key, open a reverse SSH tunnel, and install persistence, and that coding errors and missing administrator rights stopped remote login on most hosts. Anthropic did not publish the builds, and the Open VSX source never carried them.

How Fireworks AI Fits Into the Attack Chain

Fireworks AI is an inference and model training platform that Cursor used for training and inference, and it was breached first. Fireworks says it detected unauthorized use of internal credentials on October 6, 2026, and that environment variables used in evaluation jobs, including API keys and tokens stored as secrets, were captured in a limited number of customer accounts.

Fireworks AI October 2026 security bulletin showing the October 6 detection of unauthorized use of internal credentials
Fireworks AI’s first bulletin dates detection and containment to October 6, 2026, 9 a.m. PDT, and says evaluation-job environment variables were accessed. Image: Fireworks AI, captured November 16, 2026.

A November 9 update widened the picture. Fireworks says a third-party cloud provider hosting its R&D machines was breached on October 23, that the intruder reached Fireworks development machines on October 24, and that billing information, some datasets, and incomplete model weights were accessed for a limited set of accounts. Fireworks links the activity to a financially motivated group that resells stolen model access, a pattern known as LLMjacking, and says it brought in Palo Alto Networks Unit 42 for forensics.

Timeline of the Fireworks AI breach and the Cursor tampered Claude Code extension from October 6 to November 13, 2026
Dates from Fireworks AI’s October 9 and November 9, 2026 bulletins and Cursor’s security notice and November 13 update; Fireworks times are PDT. Image: AgentStack.

Cursor says the last attacker activity it saw was on November 1, and it was blocked. Cursor has moved all inference off Fireworks, rotated every exposed credential and then all internal credentials as a precaution, rebuilt the extension marketplace, restricted where service-provider credentials can be used, and added secret scanning across its code repositories and other internal data sources. BleepingComputer places the breach inside a wider wave of attacks on AI developer platforms that our Black October LLMjacking coverage tracked as it unfolded.

Why Coding-Agent Traces Carry Credentials

A coding-agent trace is the recorded sequence of prompts, model outputs, and tool calls from one agent session. Traces carry credentials because agents read files and run shell commands on a developer’s machine, and the tool output that comes back, such as a printed .env file or a failing command that echoes a token, is stored verbatim in the trace.

That data is useful for exactly the purposes that make it risky to share. Vendors want real traces to train and evaluate models, and Cursor says it was permitted to use these sessions for training because they were not in Privacy Mode. Once a trace leaves the original environment, every key inside it travels with it, and the receiving vendor’s security becomes part of the key’s security.

Would a Secret Scanner Have Caught the Keys?

A standard secret scanner would have caught most well-formed keys in a stored trace, but not every format and not keys split across streamed output. We wrote one synthetic coding-agent session in which a shell tool printed a .env file with 10 fake credential types, saved it five ways, and ran gitleaks and TruffleHog with their default rules.

Test results showing gitleaks and TruffleHog detecting 8 of 10 fake keys in stored agent traces and 0 of 10 in streamed deltas
Credential types detected by gitleaks 8.30.1 and TruffleHog 3.99.9 in one synthetic agent trace saved five ways, run November 16, 2026 with fake credentials and no live verification. Image: AgentStack.

In the stored formats, both scanners did well. gitleaks 8.30.1 and TruffleHog 3.99.9 each found 8 of 10 credential types in a plain session log, in a one-line JSONL span with the output JSON-escaped, and in a span whose tool output was base64-encoded, because both decode base64 by default. The OpenAI, Anthropic, AWS, GitHub, Slack, Stripe, and Hugging Face keys were caught by both.

The misses were consistent and instructive. Neither scanner flagged a plain DB_PASSWORD value, gitleaks missed the password inside a Postgres connection URL, and TruffleHog missed the Google API key. A redaction pipeline that relies on one scanner inherits its blind spots, so running two with different rule sets closes some of the gap at little cost.

The streamed case is the finding that matters most for agent traces. When the model echoed the same file back as streaming deltas of three to nine characters per event, no key survived intact inside one event, and both scanners found 0 of 10. Reassembling the deltas into a single text before scanning restored the 8 of 10 result, so the fix is to scan the reconstructed message, not the raw event log.

The test has limits. We used fake keys in each provider’s public format, one trace, and default rules with live verification turned off, so it shows detection behavior, not real-world recall. We do not know the format of the credentials in Cursor’s traces, and Cursor has not said which redaction it applied before sharing.

What Trace Tools Redact by Default

Most agent observability tools leave redaction to you. The OpenTelemetry instrumentation for OpenAI, opentelemetry-instrumentation-openai-v2, does not capture prompts, completions, or tool arguments and results by default; you opt in with OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT. Content capture is where the credentials live, so that switch is the one to govern.

Langfuse documents masking functions that redact inputs, outputs, and metadata before trace data leaves your application, and LangSmith offers hide and anonymizer options, including LANGSMITH_HIDE_INPUTS and an SDK anonymizer with regex patterns for API keys and tokens. Both are hooks you configure, not filters that run on a fresh install. Our AI agent observability tools guide and Langfuse alternatives roundup compare how the main platforms handle trace data.

What Teams Should Do Now

If you use Cursor, check whether Cursor notified you, and act on the notice it sent. If you installed or updated Anthropic.claude-code 2.1.312 or 2.1.313 from Cursor’s marketplace on macOS or Windows between 2:27 a.m. and 1:35 p.m. PT on October 29, follow the remediation steps: removing the extension alone may leave the SSH key and persistence scripts in place.

  1. Run Cursor’s check script, remove any unauthorized SSH key and persistence entries, and rotate credentials reachable from an affected host from a separate, trusted machine.
  2. Rotate every key listed in a Cursor or Fireworks notice with the provider that issued it, since deleting a stored secret does not revoke it.
  3. Turn on Privacy Mode or your tool’s equivalent for repositories with production access, so those sessions are not retained for training.
  4. Scan trace exports with two secret scanners before they leave your environment, and reassemble streamed deltas into full messages before you scan.
  5. Keep long-lived keys out of the files agents read: inject short-lived credentials at runtime and scope vendor-issued keys to the network locations they need.

Credential hygiene for agents is a non-human identity problem as much as a logging one. Our non-human identity tools guide covers short-lived machine credentials, and the AI coding agent security tools roundup covers controls for what coding agents can read and run. For the last supply chain attack on agent infrastructure, see our LiteLLM supply chain compromise analysis.

Credential files within an agent’s reach are also the bait in Anthropic’s Siren tests. Our Siren sandbox escape lab shows how to deny those reads and environment secrets in the Claude Code sandbox runtime.

FAQ

Was my Cursor data exposed in the security incident?

Only if Cursor notified you. Cursor says fewer than 0.05% of users had coding-agent traces exposed and fewer than 0.01% of customers had API credentials exposed, all from sessions not in Privacy Mode. Cursor says it contacted each affected user directly, so no notice means your data was not in the traces.

Was the official Claude Code extension compromised?

No. Cursor says the tampered Anthropic.claude-code 2.1.312 and 2.1.313 builds were placed on its own marketplace cache with a stolen credential. Anthropic did not publish them, the Open VSX source never carried them, and the extension from Anthropic’s official channels was not affected.

Does Privacy Mode protect my code in Cursor?

Yes, for this incident. Cursor says prompts and code from Privacy Mode sessions were not exposed, because the shared bucket held only sessions outside Privacy Mode, which Cursor was permitted to use for model training. Teams with sensitive repositories should enforce Privacy Mode for the whole team where their plan allows it.

How do I keep API keys out of agent traces?

Redact before export. Turn on masking in your trace tool, scan exports with at least two secret scanners, and reassemble streamed output before scanning. In our November 16, 2026 test, gitleaks and TruffleHog missed every key split across streamed deltas but caught 8 of 10 after reassembly.