Cursor Discloses Supply Chain Attack: Stolen Fireworks AI Key Used to Plant Trojanized Claude Code Extension

Stolen Fireworks AI key embedded in trojanized Claude Code extension exposes credential integrity gaps in agent toolchains.
A Reddit discussion recently disclosed a supply chain attack: a stolen Fireworks AI API key was embedded in a trojanized Claude Code VS Code extension, and developers who installed it unknowingly ran agents with poisoned credentials. Cursor noted the problem lies at the supply chain layer, not the model layer; current toolchains have structural gaps including static injection, no per-call validation, no binary attestation, and no in-session credential swap detection. Because agents act autonomously between human checkpoints, the blast radius is wide and post-incident response is difficult. The community agrees credential integrity must be handled as systems engineering, though views diverge on short-lived tokens, dependency review, and runtime monitoring. The article offers developers actionable advice: audit dependency chains, apply least privilege, monitor at runtime, and ensure build provenance.
Event Overview: A New Form of Supply Chain Attack
Recently, a Reddit discussion about Cursor drew attention. It was reported that a stolen Fireworks AI API key was embedded into a trojanized version of the Claude Code VS Code extension. Developers who installed the malicious extension unknowingly ran an agent carrying poisoned tool credentials. There were no anomalous signals throughout the process—developers had no way to detect it.

The key point of this incident is that the problem lies in the supply chain, not the model itself. The model ran exactly as the code instructed, and that code held a seemingly valid key pointing to a legitimate third-party service. This means attackers don't need to compromise the model—they only need to poison credentials in the toolchain to make the agent perform malicious actions.
Supply Chain Attack refers to an attack in which the adversary does not directly target the victim system but instead achieves intrusion indirectly by poisoning third-party components, tools, or services the target depends on. In software, typical forms include tampering with open-source dependency packages, hijacking build pipelines, and replacing official distribution packages. In AI agent scenarios, the boundary of the supply chain expands further: it includes not only code repositories and package managers but also external APIs called by the model, plugin extensions, and the credentials embedded within them. An attacker only needs to break any weak link in the chain—for example, a third-party service's API key—to amplify impact through the agent's autonomous execution capabilities, without directly breaching the model's safety alignment. Such attacks are extremely stealthy because every component appears to "work normally" on the surface.
Structural Gaps: Why Credential Integrity Fails
In the discussion, Cursor pointed out that current agent toolchains have structural gaps in handling credential integrity. This manifests at several levels:
- Static injection: Keys are static strings injected at configuration or build time; once replaced, subsequent stages have no way to verify them.
- No per-call validation: There is no mechanism to check on every call whether the tool endpoint is still the legitimate one.
- No binary attestation: There is a lack of means to authenticate whether the binary calling the API is the reviewed version.
- No in-session detection: If credentials are swapped during a session, the system cannot detect it at runtime.
These gaps compound, allowing an attacker to simply steal a third-party API key and replace credentials in a dependency, enabling the agent to act autonomously between human checkpoints and cause widespread impact.
Credential Integrity refers to the state in which credentials remain untampered, unreplaced, and consistent with their intended purpose and holder throughout their lifecycle. In traditional security practice, credential integrity mainly relies on encryption at rest and transport-layer protection, but in agent toolchains, credentials must flow across multiple stages: from configuration injection to tool invocation to session execution. Each stage can become a replacement point. Binary Attestation is one of the key means of ensuring integrity; it uses digital signatures or hash verification to confirm that the program executing the call is indeed the reviewed version, preventing attackers from replacing legitimate tools with trojanized binaries. Per-call authentication requires re-verifying credential validity on every tool invocation rather than relying on a one-time check at session establishment, thereby promptly detecting credential swaps during a session.
Scope of Impact and Response Challenges
Because agents execute operations autonomously between two human checkpoints, the attack's "blast radius" is wide. By the time developers notice anomalous behavior, the compromised credentials have long been used in every operation the agent performed. This means post-incident tracing and damage control become extremely difficult.
In the discussion, Cursor raised two practical questions: How do other practitioners handle credential integrity in agent toolchains? If a third-party API key embedded in a dependency is stolen and replaced, what are the current detection and response paths?
These two questions directly target the security shortcomings in current AI agent deployments. As more developers integrate agents into workflows, credential management is no longer simply "keep the key safe" but requires dynamic verification mechanisms spanning the entire toolchain.
Blast Radius originated as a military term and in cybersecurity refers to the maximum scope affected by an attack or failure. In agent scenarios, the blast radius depends on the agent's degree of autonomy, accessible resources, and credential permissions. Because an agent can continuously execute a large number of operations between two human checkpoints, once credentials are poisoned, an attacker can quickly use legitimate service interfaces to exfiltrate data, abuse resources, or move laterally further. The reason post-incident tracing is difficult is that all operations are initiated through seemingly legitimate credentials, making it hard to distinguish normal calls from malicious ones in logs; compromised credentials may have been used across multiple downstream services, and damage control requires revoking and rotating each one—time-consuming and prone to omissions.
Consensus and Divergence Across Multiple Perspectives
Judging from the Reddit discussion, this incident resonated widely on supply chain security. Most practitioners agree that credential integrity in agent toolchains is an underestimated risk. However, community opinions have not yet converged on specific response strategies.
Some argue that priority should be given to introducing short-lived tokens and per-call authentication at the tool invocation layer to reduce the exposure surface of static keys. Others point out that the root problem is the lack of a dependency review process, requiring binary attestation and build provenance mechanisms. Still others emphasize that the autonomy of agents necessitates real-time detection implanted within sessions, such as monitoring changes in credential usage patterns.
Despite different paths, the consensus is that safety alignment at the model level alone cannot cover supply chain attacks; credential integrity must be treated as a systems engineering problem.
Implications for Developers
For teams using or building AI agents, this incident offers several actionable directions for reflection:
- Audit the dependency chain: Regularly check the sources of API keys embedded in projects and avoid long-term persistence of static keys.
- Principle of least privilege: Grant third-party service keys the minimum necessary permissions to reduce impact if stolen.
- Runtime monitoring: Pay attention to patterns in how agents call external services and establish alerts for anomalous calls.
- Build provenance: Verify as much as possible that the binary calling the API matches the reviewed version, reducing the risk of replacement.
Supply chain attacks will not disappear, but through systematic credential integrity management, developers can significantly shrink the attack surface. The incident disclosed by Cursor may help the community close this gap faster.
Related articles

Gemini 4 Neon vs Claude Opus 5.5: Who Wins Across Five Real-World Tasks?
Bilibili creator tests Gemini 4 Neon vs Claude Opus 5.5 across 3D video, games, design, writing, and advice. Neon matches Opus daily, but 3D and design still lag.

Former Huawei Genius Youth Open-Sources AI Agent Guide: 90+ Hands-On Case Studies
Former Huawei Genius Youth Li Bojie open-sources AI Agent Book, the most systematic Chinese Agent learning repo on GitHub, with 90+ runnable examples covering context compression, memory frameworks, MCP tool calling, prompt injection attack and defense, and other enterprise-level hands-on content.

The Most Detailed FDE Tutorial on Bilibili: Case-Based Teaching from Business Practice to Interviews
B站UP主推出FDE从入门到面试实战教程,讲师深入业务一线,用马氏学习平台真实案例讲解FDE岗位要求。本文分析案例教学法、笔记策略与私密信息处理,为AI岗位求职者提供参考。