TL;DR
On June 17, 2026, attackers hijacked a dormant Mastra contributor account and pushed malicious versions of 140+ packages. The payload steals crypto wallets, browser data, and cloud credentials. Here is what happened, how to check your lockfile, and what to do if you installed an affected version.
| Source | Description |
|---|---|
| Socket Security disclosure | Technical analysis from the team that detected the attack |
| Hacker News discussion | Community response and additional context |
| StepSecurity advisory | Mitigation guidance and persistence removal |
| SafeDep analysis | Scope takeover mechanics |
| Mend advisory | Enterprise remediation steps |
Last updated: June 17, 2026
If you use Mastra - the TypeScript AI agent framework - check your lockfile now. On June 17, 2026, attackers compromised 140+ packages in the @mastra/* npm scope and injected a remote access trojan that steals cryptocurrency wallets, browser data, and cloud credentials. The attack was active for approximately 88 minutes before detection, but the affected package versions may still be cached in your node_modules or CI pipelines.
This is not a theoretical risk. Mastra's @mastra/core package alone has over 918,000 weekly downloads. The framework is used for building AI agents that typically run in environments with access to LLM API keys, cloud provider credentials, and production databases - exactly the assets this malware targets.
June 16, 2026, 07:05 UTC - npm user sergey2016 published easy-day-js@1.11.21, a clean clone of the legitimate dayjs date library. No malicious code at this point - just a typosquat waiting to be weaponized.
June 17, 2026, 01:15-02:36 UTC - Attackers used the compromised account ehindero - a legitimate former Mastra contributor whose npm scope access was never revoked - to publish 141 malicious versions across the @mastra/* namespace. Each new version added a single dependency to package.json:
"dependencies": {
"easy-day-js": "^1.11.21"
}
June 17, 2026, ~02:40 UTC - easy-day-js was updated to version 1.11.22 with the actual payload: a postinstall hook that downloads and executes a Node.js remote access trojan.
Within 6 minutes - Socket's dependency analysis flagged the malicious easy-day-js and automatically blocked installs for protected users.
June 17, 2026 - npm pulled the malicious versions from the highest-profile packages and reverted their latest tags to clean versions.
The payload is a two-stage remote access trojan designed for persistence and data theft.
When you run npm install on an affected @mastra/* version, npm's postinstall hook executes node setup.cjs --no-warnings. This script:
23.254.164.92:800023.254.164.123:443This all happens automatically during npm install, before you import any code.
The second stage is a 41KB cross-platform Node.js implant that:
The persistence means the malware survives reboots and continues operating even after you remove the npm packages.
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools - delivered free every week.
From the archive
Jun 17, 2026 • 8 min read
Jun 15, 2026 • 9 min read
Jun 15, 2026 • 8 min read
Jun 15, 2026 • 8 min read
Check your lockfile for any easy-day-js dependency or any @mastra/* package versions published between June 17, 2026 01:15 UTC and the npm takedown.
# Check for easy-day-js anywhere in your lockfile
grep -r "easy-day-js" package-lock.json pnpm-lock.yaml yarn.lock 2>/dev/null
# Check for recent @mastra/* installs
npm ls | grep "@mastra" 2>/dev/null
If you find easy-day-js in your dependency tree, assume the machine is compromised.
You are at higher risk if you:
If you installed an affected version, treat the machine as compromised. This is not overcautious - the malware is specifically designed to persist and exfiltrate credentials silently.
macOS:
rm -f ~/Library/LaunchAgents/com.*.plist
launchctl list | grep -i "com\." | xargs -I {} launchctl remove {}
Linux:
rm -f ~/.config/systemd/user/*.service
systemctl --user daemon-reload
Windows (PowerShell as admin):
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "*suspicious*"
Assume exfiltration. Rotate immediately:
npm token revokeIf you have any crypto wallet browser extensions installed:
rm -rf node_modules package-lock.json
npm cache clean --force
npm install --ignore-scripts # Install without running postinstall hooks
Then verify your lockfile contains no easy-day-js before allowing scripts to run.
This attack highlights a pattern that will keep repeating: AI agent frameworks run with elevated privileges and extensive credential access. They are high-value targets.
npm config set ignore-scripts true
This breaks some legitimate packages that need postinstall hooks (like esbuild or sharp), but it also breaks supply chain attacks. You can allowlist specific packages that genuinely need postinstall execution.
Tools like Socket, Snyk, and npm audit catch many supply chain attacks. Socket specifically flagged this attack within 6 minutes of the malicious payload going live.
The ehindero account was a former contributor whose access was never revoked. This is the most common path for scope takeover attacks. Review who has publish access to your npm packages quarterly.
Avoid ^ and ~ ranges for critical dependencies. A pinned version in your lockfile would not have automatically pulled the malicious update.
Mastra is not uniquely vulnerable - it just happened to be the target this time. Every AI agent framework that installs via npm (LangChain, Vercel AI SDK, CrewAI, etc.) has the same attack surface: postinstall hooks that run automatically during npm install.
The uncomfortable truth is that AI agent development environments are among the most valuable targets for supply chain attacks. They typically have:
If you are building AI agents, you need to treat your development environment with the same security posture as a production server. That means:
On June 17, 2026, attackers compromised 140+ npm packages in the @mastra/* scope by hijacking a dormant contributor account. They injected a dependency on a typosquatted package (easy-day-js) that downloads and executes a remote access trojan during npm install. The malware steals cryptocurrency wallets, browser data, and cloud credentials.
Search your lockfile for easy-day-js: grep -r "easy-day-js" package-lock.json. If present, assume the machine is compromised. Also check for any @mastra/* packages updated on June 17, 2026.
Rotate npm tokens, GitHub tokens, cloud provider credentials (AWS/GCP/Azure keys), LLM API keys (OpenAI, Anthropic), and any secrets stored in environment variables. For cryptocurrency, transfer funds to a new wallet with a fresh seed phrase generated on a clean device.
The malicious packages were published between 01:15 and 02:36 UTC on June 17, 2026 - approximately 88 minutes. Socket detected the attack within 6 minutes of the payload activation. However, affected package versions may still exist in cached node_modules or CI artifacts.
npm has reverted the latest tags to clean versions. However, you should verify your lockfile contains no easy-day-js dependency and that your installed versions are from before June 17, 2026 or after the npm takedown.
The malware installs persistence mechanisms specific to each OS: LaunchAgents on macOS, systemd user services on Linux, and Run registry keys on Windows. See the remediation section above for removal commands.
The attacker used the npm account ehindero, described as a former Mastra contributor whose scope access was never revoked. The exact compromise method (credential reuse, phishing, etc.) has not been publicly disclosed.
AI agent frameworks run in development environments with access to LLM API keys, cloud credentials, and often production data. They are high-value targets because a single compromised package can harvest credentials for multiple cloud services, payment processors, and AI providers.
Read next
A Hacker News thread on config files that run code points at the next AI coding risk: agent hooks, skills, and editor rules need review like executable dependencies.
8 min readBefore an AI agent gets tools, files, APIs, MCP servers, or deployment access, decide what it can read, write, call, log, and roll back.
8 min readThe Miasma worm has evolved from package registry poisoning to directly hijacking AI coding tools - if your team clones open-source repos and opens them in Claude Code, Cursor, Gemini CLI, or VS Code, you may already be compromised.
7 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.
TypeScript-first AI agent framework. Agents, tools, memory, workflows, RAG, evals, tracing, MCP, and production deployme...
View ToolMost popular LLM framework. 100K+ GitHub stars. Chains, RAG, vector stores, tool use. LangGraph adds stateful multi-agen...
View ToolPython's de facto data validation library. Type-hint-driven models, fast Rust-based core (v2), and the foundation of Fas...
View ToolDeep comparison of the top AI agent frameworks - LangGraph, CrewAI, Mastra, CopilotKit, AutoGen, and Claude Code.
AI AgentsConfigure Claude Code for maximum productivity -- CLAUDE.md, sub-agents, MCP servers, and autonomous workflows.
AI AgentsWhat MCP servers are, how they work, and how to build your own in 5 minutes.
AI Agents
A Hacker News thread on config files that run code points at the next AI coding risk: agent hooks, skills, and editor ru...

Before an AI agent gets tools, files, APIs, MCP servers, or deployment access, decide what it can read, write, call, log...
The Miasma worm has evolved from package registry poisoning to directly hijacking AI coding tools - if your team clones...
Security researchers showed a €0.02 bank transfer could compromise a banking AI assistant. Here is the exact attack chai...
Both Mastra and LangGraph.js are serious TypeScript agent frameworks - but they start from opposite philosophies. Here i...
Four mature, production-ready TypeScript frameworks have made building agents genuinely enjoyable. Here is how to pick t...

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.