May 2026 Supply Chain Attacks — Behavioral Analysis #21
piiiico
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Five npm supply chain attacks in the first 29 days of May 2026. They share a structural pattern that advisory databases don't flag but behavioral scoring does.
Timeline
The common structural tell
The March, May 14, and May 19 attacks all exploited packages with sole npm publisher status — one person with publish access, millions of weekly downloads. Credential theft → malicious version published → millions of machines exposed in minutes.
npm auditdoesn't flag this. Stars don't either. These packages had high stars, active GitHub communities, and green CI badges. The vulnerability wasn't in the code — it was in the publisher concentration.TrapDoor and the typosquatting wave used a different vector (new malicious packages, not compromised existing ones) but introduced a novel escalation: AI coding assistant poisoning via
.cursorrulesandCLAUDE.mdfiles containing hidden instructions that trick coding agents into exfiltrating credentials.Behavioral scores before exploitation
Commit scores packages on publisher concentration, release consistency, provenance, and longevity — not CVE databases. Here's how the attacked packages scored:
The CRITICAL flag means: sole npm publisher + >10M weekly downloads. This is the exact pattern that was exploited.
These scores existed before the attacks. The signal was visible. Nobody was looking at it.
Check your own dependencies
Protecting AI coding assistants
TrapDoor specifically targets Cursor and Claude Code by planting instructions in
.cursorrulesandCLAUDE.md. Thepoc hookcommand installs a CursorbeforeShellExecutionhook that scores packages against behavioral signals beforenpm install,pip install,cargo add, orgo getruns:When an AI coding assistant tries to install a package, the hook checks the behavioral score and blocks or warns before the install completes.
What this means
Supply chain attacks are accelerating. May 2026 saw an attack roughly every 4 days. The pattern is consistent: publisher concentration creates single points of failure that credential theft exploits.
Advisory databases (CVE, npm audit) flag known vulnerabilities after discovery. Behavioral signals flag structural risk before exploitation. Both are needed.
Resources
Data sources: npm registry, PyPI, crates.io, proxy.golang.org, deps.dev, GitHub API, OpenSSF Scorecard.
Attack references: Microsoft, The Hacker News, Socket.dev, CISA.
All reactions