MLXIO
Matrix movie still
CybersecurityMay 26, 2026· 6 min read· By MLXIO Insights Team

34 TrapDoor Packages Poison AI Coding Tools to Steal Keys

Share

MLXIO Intelligence

Analysis Snapshot

60
Moderate
Confidence: LowTrend: 10Freshness: 95Source Trust: 100Factual Grounding: 94Signal Cluster: 20

Moderate MLXIO Impact based on trend velocity, freshness, source trust, and factual grounding.

Thesis

High Confidence

TrapDoor broadened developer credential theft from malicious packages into AI coding-tool poisoning by publishing 34 packages across npm, PyPI, and Crates.io and hiding instructions in repository files read by coding assistants.

Evidence

  • Socket Security publicly named the campaign on May 25, 2026, with earliest traces on May 19 and a main wave on May 22 at 20:20 UTC.
  • Attackers pushed 384 versions across npm, PyPI, and Crates.io, targeting crypto wallets, SSH keys, cloud credentials, AWS and GitHub tokens, browser data, and environment variables.
  • Execution paths included npm postinstall hooks, PyPI import-time execution, and Crates.io build.rs scripts.
  • TrapDoor planted .cursorrules and CLAUDE.md files with zero-width Unicode instructions and opened pull requests against BrowserUse, LangChain, and LangFlow.

Uncertainty

  • The article does not state how many developers or systems installed or imported the packages before detection.
  • It is unclear whether any poisoned pull requests were merged into target repositories.
  • The reporting does not verify a campaign based on copy-pasted AI-generated commands.

What To Watch

  • Registry takedowns and any new TrapDoor package names or publisher accounts across npm, PyPI, and Crates.io.
  • Evidence that poisoned .cursorrules or CLAUDE.md files were merged or reused in other repositories.
  • Updates from Socket Security on payload changes, credential validation behavior, or additional affected projects.

Verified Claims

TrapDoor planted 34 malicious packages across npm, PyPI, and Crates.io in a credential-theft campaign targeting crypto and AI developers.
📎 “TrapDoor planted 34 malicious packages across npm, PyPI, and Crates.io in a credential-theft campaign aimed at crypto and AI developers.”High
Socket Security publicly named the TrapDoor campaign on May 25, 2026, with earliest traces on May 19 and a main wave on May 22 at 20:20 UTC.
📎 “The campaign was publicly named by Socket Security on May 25, 2026, with earliest traces on May 19 and a main wave landing May 22 at 20:20 UTC.”High
Attackers pushed 384 package versions across npm, PyPI, and Crates.io, with a consistent payload targeting wallets, SSH keys, cloud credentials, AWS and GitHub tokens, browser data, and environment variables.
📎 “By publication, attackers had pushed 384 versions across the three registries” and “TrapDoor’s payload was consistent across all 384 versions.”High
TrapDoor used different execution paths by registry: npm postinstall hooks, PyPI import-time execution, and Crates.io build.rs scripts.
📎 The article lists npm “postinstall hooks,” PyPI “import-time execution,” and Crates.io “build.rs script” as reported execution paths.High
TrapDoor attempted to poison AI coding workflows by placing .cursorrules and CLAUDE.md files with hidden zero-width Unicode instructions into target repositories.
📎 “It also planted .cursorrules and CLAUDE.md files into target repositories, using zero-width Unicode characters to hide instructions.”High

Frequently Asked

What is the TrapDoor malicious package campaign?

TrapDoor is a credential-theft campaign involving 34 malicious packages across npm, PyPI, and Crates.io aimed at crypto and AI developers.

What credentials did TrapDoor try to steal?

The payload targeted crypto wallets, SSH keys, cloud credentials, AWS and GitHub tokens, browser data, and environment variables.

How did TrapDoor packages execute malicious code?

The article reports npm postinstall hooks, PyPI import-time execution, and Crates.io build.rs scripts as the confirmed execution paths.

How did TrapDoor target AI coding assistants?

TrapDoor planted .cursorrules and CLAUDE.md files containing hidden zero-width Unicode instructions that AI coding tools could read as project-level instructions.

Which repositories did attackers target with poisoned AI instruction files?

The attacker opened pull requests against BrowserUse, LangChain, and LangFlow to test whether the poisoned files could survive review.

Updated on May 26, 2026

TrapDoor planted 34 malicious packages across npm, PyPI, and Crates.io in a credential-theft campaign aimed at crypto and AI developers — and its most aggressive move was trying to poison AI coding assistants, not just package managers.

The campaign was publicly named by Socket Security on May 25, 2026, with earliest traces on May 19 and a main wave landing May 22 at 20:20 UTC, according to Notebookcheck. By publication, attackers had pushed 384 versions across the three registries.

TrapDoor Campaign Hits npm, PyPI, and Crates.io With 34 Malicious Developer Packages

The first confirmed package was eth-security-auditor on PyPI. Dozens followed from a cluster of accounts publishing in bursts across three major open-source registries.

The package names were built to look useful inside crypto, DeFi, Solana, and AI development workflows. Reported examples include prompt-engineering-toolkit, defi-threat-scanner, wallet-security-checker, and solidity-deploy-guard.

The core question for security teams is simple: would those names have looked suspicious during a fast-moving build or audit cycle?

TrapDoor’s payload was consistent across all 384 versions. It targeted crypto wallets, SSH keys, cloud credentials, AWS and GitHub tokens, browser data, and environment variables.

Registry Reported execution path Reported behavior
npm postinstall hooks Drops trap-core.js, validates stolen tokens against live AWS and GitHub endpoints, and attempts persistence through cron jobs, systemd, Git hooks, and SSH
PyPI import-time execution Fetches JavaScript from an attacker-controlled GitHub Pages domain, letting the attacker update payload code without changing the PyPI package
Crates.io build.rs script Locates local keystores and sends XOR-encrypted data to GitHub Gists

Socket’s reported median detection time was five minutes and 27 seconds. That speed matters, but it does not erase the risk for any machine that installed or imported one of the packages before detection.


AI Coding Workflows Create a High-Value Target for Credential Theft

TrapDoor did not stop at malicious dependencies. It also planted .cursorrules and CLAUDE.md files into target repositories, using zero-width Unicode characters to hide instructions that are invisible or hard to spot in normal text review but still readable by software.

Those files matter because AI coding tools can read project-level instructions before suggesting, editing, or running code. In TrapDoor’s case, the hidden instructions were designed to make an AI coding assistant see what looked like a routine security scan while actually driving secret exfiltration from the local machine.

Could a reviewer approve the file while the AI assistant reads a different operational meaning? That is the danger Socket’s reporting points to.

The attacker opened pull requests against BrowserUse, LangChain, and LangFlow to test whether those poisoned files could survive normal review. If merged, the source material says every developer opening the repository with an AI coding tool could become a target.

For related MLXIO reading on this trust boundary, see Claude Code Exposes the New Coding Risk: Blind Trust and Google Antigravity 2.0 Bets $100 on AI Coding Agents.

The reported spread mechanism is narrower than some broader supply-chain fears. Based on the supplied reporting, TrapDoor’s confirmed routes were package install hooks, import-time execution, Rust build scripts, and poisoned repository instruction files — not a verified campaign of copy-pasted AI-generated commands.

MLXIO analysis: the attacker appears to be moving the target from “bad package in a registry” to “trusted developer workflow.” That shift makes the editor and AI assistant part of the execution path, not just passive tools around the code.

Developers Should Audit Dependencies, Secrets, and Package Install History

The most immediate work is verification, not panic. Teams should review recent installs from npm, PyPI, and Crates.io around the reported TrapDoor window, especially anything added near or after May 22 at 20:20 UTC.

Which machines actually ran the package code? That question matters more than whether a dependency merely appeared in a file.

Practical checks should start with the data TrapDoor reportedly sought:

  • SSH keys: Identify developer machines and CI runners that may have exposed keys.
  • Cloud credentials: Review AWS-related tokens and environment variables present on affected systems.
  • GitHub tokens: Check local developer environments and automation contexts where tokens may have been stored.
  • Wallet material: Treat exposed crypto wallet files or keystores as high-risk.
  • Browser data: Consider whether local browser credential stores were accessible on affected devices.

MLXIO analysis: credential rotation is justified where execution is confirmed or strongly suspected, because the reported malware did not merely stage files; it validated tokens against live AWS and GitHub endpoints and attempted persistence through local mechanisms.

Dependency pinning, approval workflows for new packages, secret scanning, and least-privilege cloud credentials can reduce blast radius, but none of those controls should be treated as proof that no compromise occurred. Pinning helps control change; it does not make a newly approved malicious package safe.

Teams using AI coding assistants should also review repository files that guide assistant behavior. .cursorrules and CLAUDE.md should be treated as security-sensitive when they can influence tool actions, especially if they arrive through external pull requests.

For a separate cloud-secrets failure mode, MLXIO readers can also compare the TrapDoor credential-theft angle with CISA Spilled Cloud Keys on GitHub — Then Said No Harm.


Package Registry Responses and Victim Scope Will Shape the Next Phase of the TrapDoor Investigation

The next phase depends on what npm, PyPI, Crates.io, and researchers publish after the initial disclosure. The supplied source does not provide download counts, confirmed victim names, or verified losses.

How many developers actually executed TrapDoor packages before detection? That remains one of the largest open questions.

Investigators will likely focus on whether the publishing accounts were coordinated manually or automated, how package names were selected, and whether the pull requests to BrowserUse, LangChain, and LangFlow were probes or part of a wider attempt to seed AI-readable instructions into trusted repositories.

There is also no attribution in the supplied material tying TrapDoor to a known threat actor. For now, it is best described as a cross-registry supply-chain campaign with a credential-theft payload and an AI-assistant poisoning component.

The watch item is not only whether the identified packages disappear from registries. It is whether maintainers begin reviewing AI instruction files with the same suspicion they already apply to install scripts, build hooks, and CI configuration. TrapDoor’s message is blunt: if a tool can read instructions and act on them, attackers will try to write those instructions first.

Impact Analysis

  • TrapDoor shows attackers are targeting AI coding assistants as a software supply-chain infection path.
  • The campaign used trusted package registries to reach crypto, DeFi, Solana, and AI developers during normal workflows.
  • Its payload targeted high-value developer secrets including crypto wallets, SSH keys, cloud credentials, AWS and GitHub tokens, and environment variables.

TrapDoor behavior by package registry

RegistryReported execution pathReported behavior
npmpostinstall hooksDrops trap-core.js, validates stolen AWS and GitHub tokens, and attempts persistence through cron jobs, systemd, Git hooks, and SSH
PyPIimport-time executionFetches JavaScript from an attacker-controlled GitHub Pages domain so payload code can change without updating the PyPI package
Crates.iobuild.rs scriptLocates local keystores

TrapDoor campaign scale

Malicious packages
count34
Package versions
count384
MLXIO

Written by

MLXIO Insights Team

Algorithmic Research & Human Oversight

Powered by advanced algorithmic research and perfected by human oversight. The Insights Team delivers highly structured, cross-verified analysis on emerging tech trends and digital shifts, filtering out the fluff to give you high-fidelity value.

Related Articles

black flat screen computer monitor
CybersecurityMay 25, 2026

CISA Spilled Cloud Keys on GitHub — Then Said No Harm

A CISA contractor exposed passwords, tokens and AWS GovCloud keys on GitHub. The agency says it sees no sign sensitive data was compromised.

6 min read

people walking on sidewalk near white concrete building during night time
CybersecurityMay 22, 2026

Leaked AWS GovCloud Keys Drag CISA Into Congress Fight

CISA faces congressional scrutiny after a contractor exposed agency credentials and AWS GovCloud keys on GitHub.

7 min read

a blue and white logo
CybersecurityMay 12, 2026

Cloud DevOps Security Risks Spike in 2026 — Are You Ready?

Security threats in cloud DevOps platforms escalate in 2026, demanding urgent action to protect code, secrets, and infrastructure from sophisticated attacks.

11 min read

a close up of a network with wires connected to it
CybersecurityMay 22, 2026

Microsoft Defender Zero-Days Hand Hackers SYSTEM Keys

Microsoft rushed emergency Defender fixes after live attacks exploited two zero-days, including one path to SYSTEM-level control.

6 min read

a fallen leaf covered path next to a body of water
CybersecurityMay 19, 2026

Enterprise SIEM Tools Crush Traditional Security Monitoring in 2026

Enterprise SIEM tools outclass traditional security monitoring by delivering superior threat detection, operational efficiency, and compliance in 2026.

10 min read

silver and black round emblem
CryptoMay 26, 2026

Fake Uniswap Google Ads Drain $400K in Wallet Trap

A fake sponsored Uniswap result on Google drained over $400K, proving search ads can become crypto wallet traps.

7 min read

stock market candlestick chart on dark screen
CryptoMay 26, 2026

10 DeFi Protocols Grab 87% as Hyperliquid Takes Lead

Ten DeFi protocols captured 87% of holder revenue, with Hyperliquid alone taking 38.4% of distributions.

7 min read

man looking at activity tracker
TechnologyMay 26, 2026

Luna Band Ditches Fees — and Throws Whoop a July Fight

Luna Band launches in July with a no-subscription pitch aimed straight at Whoop’s recurring-fee model.

8 min read

gray and black laptop computer on surface
TechnologyMay 26, 2026

64GB HP EliteBook X G2q Dares Arm to Fight x86 PCs

HP’s EliteBook X G2q brings 64GB RAM and a 700-nit OLED to a 14-inch Arm business laptop.

6 min read

a person blood glucose testing using gluco-meter
TechnologyMay 26, 2026

Hardware Closer Takes Over Apple Watch Glucose Monitoring

Apple’s glucose effort has a new hardware leader, hinting the long-running Apple Watch project may be moving closer to product work.

7 min read

Stay ahead of the curve

Get a weekly digest of the most important tech, AI, and finance news — curated by AI, reviewed by humans.

No spam. Unsubscribe anytime.