A developer pastes a config snippet containing an API key into an AI assistant's chat to get help with a bug. Months later, that conversation sits in a third-party provider's storage, and the same key helps an attacker go deeper into the vendor's systems. That is what happened in the Cursor breach disclosed on 14 November 2026, and it is a good reason for every team using AI coding assistants to look at how API keys leak through AI agent logs.

What happened at Cursor

Cursor is an AI code editor built on VS Code. According to the incident report as covered by BleepingComputer on 14 November 2026, the attack began with an access key stored at Fireworks AI, a third-party provider Cursor used for model training and inference. The attacker used it to copy data from a read-only storage bucket the two companies used to share information.

That bucket held AI coding-agent traces, mostly from 2025, collected from users who had not enabled Privacy Mode. Some traces contained API credentials in plain text. The attacker used them to reach more of Cursor's SaaS tools and took archived non-production source code, support information, and credentials customers had previously shared with support.

The most visible damage came on 29 October. Using a stolen credential, the attacker placed malicious copies of Anthropic's Claude Code extension in the cache that serves Cursor's extension marketplace. Versions 2.1.312 and 2.1.313 were up for about 11 hours and may have reached up to 5,000 users. The malware tried to install an attacker-controlled SSH key for persistent access, though researchers found coding errors that likely stopped it from working on many Windows and macOS machines without SSH already enabled. The Hacker News reported the same origin: a stolen Fireworks AI key.

Cursor says fewer than 0.05% of users had traces exposed and fewer than 0.01% of customers had API credentials compromised. Anthropic's legitimate extension and Open VSX were not affected.

A small chain with wide consequences

There was no sophisticated software bug here. The chain was a key held by a third party, a log store holding secrets as plain text, a credential with publishing rights, and an extension marketplace. Each link looks ordinary; together they form a supply chain attack.

For businesses the lesson has two layers. First, what does your AI provider store about you, for how long, and is it used for training? Second, your own team: once someone pastes a secret into a prompt, it has left your control, however reputable the tool.

Audit your development team now

If your team uses Cursor, VS Code, or similar AI tools, work through this list in order.

  1. Check installed extensions. Open the extension list and look at the Claude Code version. If you installed or updated around 29 October 2026 and see 2.1.312 or 2.1.313, follow the remediation guidance published by Cursor.
  2. Look for rogue SSH traces. On Linux or macOS, review ~/.ssh/authorized_keys for lines you do not recognise, and on suspect machines check whether the SSH service was recently enabled.
  3. Rotate keys. Treat any API key that ever appeared in a prompt, an open file beside the assistant, or a chat log as exposed, especially if privacy mode was off.
  4. Turn on no-training or privacy modes in every AI tool the team uses, and write it into your internal process.
  5. Limit key scope. Read-only, per-project, expiring keys shrink the damage of a leak.

To spot secrets already sitting in code, run a quick scan before opening a project with an AI assistant. The command below uses grep to find common key patterns; it is a fast check, not a replacement for a dedicated secret scanner.

grep -rEn --exclude-dir=node_modules --exclude-dir=.git \
  "(api[_-]?key|secret|token|password)[\"' ]*[:=]" .

For repository-level scanning, see our post on GitHub secret scanning, and for the wider context of account takeovers through leaked secrets, CI/CD secrets leaks that cost 4,837 GitHub accounts.

Mask data before it reaches the AI

Internal rules only go so far, because people will still paste the wrong thing. A more durable fix is a masking layer that hides sensitive data (keys, personal information, contract numbers) before content leaves your machine for an AI service. If the provider's log store is ever exposed, what sits in it is already masked.

If your company feeds documents or customer data into a chatbot or internal assistant, take a look at Besoft's AI Masking to see how data can be masked before it goes to a model.

Questions to put to your AI vendor

Before signing or renewing with an AI tool, ask directly:

  • Where are conversation logs and traces stored, for how long, and who can access them?
  • Is data used for model training by default, and how do we turn that off?
  • Which third parties handle inference or storage, and how are access keys between you managed?
  • Does extension or plugin publishing require separate signing and review?

A vague answer is still an answer. For sensitive projects, running models inside your own infrastructure or masking data before sending it is usually the safer route. If you want to review how your team works with AI, browse the projects Besoft has delivered and talk to us about what fits.

Sources

  • BleepingComputer, "Cursor confirms security breach led to malicious Claude Code extension", 14 Nov 2026.
  • The Hacker News, "Cursor Says Stolen Fireworks AI Key Led to Trojanized Claude Code Extension Incident", Nov 2026.