TrapDoor exposes developer supply chains to credential theft

Hackers have used 34 malicious open-source packages across npm, PyPI and Crates. io to steal cloud credentials, crypto wallet data, SSH keys and developer secrets, exposing a widening security gap in software supply chains used by blockchain, artificial intelligence and cloud engineering teams.

The campaign, tracked as TrapDoor, spans more than 384 package versions and artefacts. It targets developers working in cryptocurrency, DeFi, Solana, Sui, Move, AI tooling and cloud environments, where a single workstation can hold access to source code, deployment systems, private wallets and production infrastructure.

The attack is significant because it does not rely on exploiting a conventional software vulnerability. The packages themselves carry the malicious code. That means standard vulnerability scanners looking only for known CVEs may fail to flag the threat, even when the packages are present in lockfiles, build systems or developer machines.

TrapDoor used three separate execution paths, tailored to each ecosystem. Malicious npm packages relied on post-install scripts that run automatically after installation. PyPI packages executed remote JavaScript during import. Crates. io packages abused Rust build scripts, which run during compilation, giving the malware access to local files before developers interacted with the package code.

The campaign appears to have unfolded in waves from May 2026, with packages published under names designed to resemble legitimate security, blockchain and developer utilities. Names linked to wallet checking, DeFi risk scanning, deployment auditing, project bootstrapping and AI prompt or model tools helped the packages blend into workflows where developers may be testing new utilities quickly.

The npm side of the operation included a shared JavaScript payload known as trap-core. js. That payload scanned infected machines for SSH private keys, AWS credential files, GitHub tokens, browser profile data, environment variables, crypto wallet extensions and local configuration files. It also attempted to validate stolen AWS and GitHub credentials, filtering for usable access before exfiltration.

The malware went beyond one-time data theft. It attempted to create persistence through shell configuration files, Git hooks, cron jobs, systemd user services, SSH modifications and project files used by AI coding tools. That behaviour raises the risk that an infected machine could remain compromised after the developer deletes the original package.

One of the more unusual features of TrapDoor is its targeting of AI-assisted development environments. The payload planted or altered files such as. cursorrules and CLAUDE. md, which are used by coding assistants to understand project-specific context. Hidden instructions using zero-width Unicode characters could be placed inside those files, making malicious prompts difficult for developers to notice during normal review.

That technique reflects a shift in supply-chain attacks from simple dependency poisoning to manipulation of the full developer workspace. As engineering teams adopt AI coding tools, attackers are probing whether those tools can be influenced to run commands, inspect local secrets or help automate exfiltration under the appearance of routine security checks.

The Crates. io packages were aimed at Rust developers working with Sui and Move tooling. Their build. rs scripts searched for wallet keystores linked to Sui and Aptos environments, encrypted data and sent it to attacker-controlled infrastructure. Rust build scripts are often treated as normal build-time code, but they can read files and make network calls, making them a valuable route for attackers targeting blockchain developers.

The PyPI packages used import-time execution to fetch external JavaScript payloads. That design allowed attackers to separate the delivery package from the active malicious logic, giving them room to update behaviour without republishing new package versions. For teams relying on pinned dependency versions, that approach complicates response because the same installed package may call out to changing remote infrastructure.

TrapDoor comes amid growing concern over attacks on developer infrastructure rather than end-user devices. Engineering environments often contain secrets with broad privileges, including cloud keys, CI/CD tokens, package registry credentials and access to internal repositories. Compromise of one developer machine can become a path into build pipelines, production systems and private codebases.

The immediate priority for affected teams is to audit dependency files across package. json, requirements. txt, Cargo. toml and lockfiles for the listed malicious packages and versions. Machines or CI environments that installed suspect packages should be treated as potentially compromised. Credentials exposed on those systems, including AWS keys, GitHub tokens, SSH key pairs, wallet secrets and environment variables, should be rotated rather than merely rechecked.



Notice an issue?

Arabian Post strives to deliver the most accurate and reliable information to its readers. If you believe you have identified an error or inconsistency in this article, please don't hesitate to contact our editorial team at editor[at]thearabianpost[dot]com. We are committed to promptly addressing any concerns and ensuring the highest level of journalistic integrity.


ADVERTISEMENT