TrapDoor Malware Targets Developer Supply Chain via AI Assistants
A sophisticated software supply chain attack, codenamed TrapDoor, is actively targeting developers in the cryptocurrency and artificial intelligence sectors.
A sophisticated software supply chain attack, codenamed TrapDoor, is actively targeting developers in the cryptocurrency and artificial intelligence sectors. According to the developer platform Socket, which first identified the campaign, attackers have deployed more than 34 malicious software packages across 384 versions. The attack aims to exfiltrate sensitive credentials, including private keys for crypto wallets, SSH keys, cloud credentials, and API tokens. The distribution vectors are the public package repositories npm (JavaScript), PyPI (Python), and Crates (Rust), which serve as foundational infrastructure for their respective developer communities. The malware specifically targets wallets and platforms including MetaMask, Coinbase, Binance, Solana, Sui, and Aptos, in addition to the Brave browser. A novel component of the attack involves hijacking popular AI coding assistants, such as Claude and Cursor, to manipulate developers into exposing their credentials.
Anatomy
The architecture of the TrapDoor campaign relies on subverting the trust inherent in open-source development workflows. The attack proceeds through several distinct stages.
First, the attackers publish malicious packages to high-traffic public repositories. The package names are carefully crafted to masquerade as legitimate development utilities, such as project setup tools, Solidity and Move language tooling, or prompt engineering libraries. This social engineering tactic exploits the tendency of developers to install helper packages to streamline their work, often with minimal vetting.
Second, upon installation by a developer, the malware executes on their local machine. This grants the attackers an initial foothold inside a trusted environment. The malware is designed to be persistent and evasive, scanning the system for a wide array of valuable credentials. Its targets include configuration files for cloud providers, local SSH key storage, browser extension data containing wallet information, and environment variables which often store API keys and GitHub access tokens.
Third, the campaign employs a novel exfiltration vector by targeting AI coding assistants. The malware injects hidden instructions into the developer's environment. These instructions are designed to hijack the AI assistant, which typically has privileged access to the user's codebase and local files. The goal is to trick the AI into executing a workflow disguised as a benign task, for example a 'security scan'. This manipulated workflow is, in reality, a script which locates and exfiltrates the developer's secrets to an attacker-controlled server. This subverts a tool intended for productivity, turning a trusted assistant into an insider threat.
Socket reports that the campaign shows signs of being AI-assisted in its own creation. The rapid iteration of packages, the generation of generic lure repositories on GitHub, and the mix of functional malware with partially implemented concepts suggest the use of automation to scale the attack and probe for weaknesses across multiple developer ecosystems simultaneously.
Pattern
TrapDoor follows the established pattern of software supply chain attacks that have targeted critical infrastructure and technology firms. It is functionally similar to past incidents where attackers have poisoned public repositories like npm and PyPI with malicious code. The core principle remains the same: compromise a single, trusted component that will be automatically distributed to a large number of downstream targets. Developers, by nature of their work, are high-value targets because they hold privileged access to source code, production systems, and digital assets.
The use of typosquatting and masquerading, where malicious packages mimic the names of legitimate ones, is a common tactic. TrapDoor refines this by creating plausible, but entirely fabricated, tools that appeal to developers working with emerging technologies like blockchain and AI. This allows the campaign to achieve broad reach across adjacent communities where valuable credentials are likely to be present.
What distinguishes TrapDoor is its weaponisation of AI development tools. Previously, attackers might use AI to generate phishing emails or polymorphic malware. Here, the attackers are using AI to accelerate the deployment of their malicious packages while simultaneously targeting the AI tools used by their victims. This represents a significant evolution. The attack moves beyond simple credential theft to the active manipulation of a developer's most advanced and trusted tools. It treats the AI assistant not just as a source of data, but as an execution environment that can be controlled and directed against its user.
Forward Implication
The TrapDoor campaign establishes AI coding assistants as a new, high-value attack surface. As these tools become more deeply integrated into development environments, their access to sensitive information and system functions will grow, making them a prime target for compromise. The implicit trust developers place in these assistants can now be exploited to bypass conventional security measures. Security models for development platforms must now account for the possibility that the AI itself is a vector for data exfiltration.
This incident intensifies the pressure on public package repositories and the organisations that maintain them. The burden of verifying the safety of hundreds of thousands of open-source packages is a significant challenge with no clear solution. The attack highlights a fundamental tension: the open, collaborative nature of modern software development creates efficiencies, but also systemic vulnerabilities. A single compromised developer using these tools can lead to the compromise of an entire project, the theft of treasury funds, or the insertion of backdoors into critical smart contracts or protocols.
The emergence of AI-on-AI attacks, where AI is used to both build and execute the exploit, suggests a future of accelerated, automated cyber warfare. The speed and scale demonstrated by the TrapDoor campaign may become the norm, forcing a re-evaluation of security postures across the technology sector. The question is no longer just how to secure a developer's machine, but how to secure the complex, AI-augmented ecosystem in which they operate.
---
Zero Trust Network · Intelligence Division · Truth · Strategy · Sovereignty


Discussion