@mastra npm scope compromise
A maintainer's npm account with rights across the @mastra scope was taken over and used to publish new versions of more than 140 Mastra packages. Each added one dependency, easy-day-js, a lookalike of dayjs whose malicious release installed a remote-access implant aimed at credentials, browser data and wallets.
- First seen
- 2026-06-17
- Disclosed
- 2026-06-17
- Affected packages
- 7
- Attributed to
- Sapphire Sleet, according to Microsoft Threat Intelligence
What to do
Remove easy-day-js and pin to releases from before 2026-06-17 (Microsoft names mastra 1.13.0 and @mastra/core 1.42.0) or to Mastra's later clean releases. Treat any machine or CI runner that installed @mastra packages that day as compromised and rotate its credentials. Installing with lifecycle scripts disabled limits this kind of attack.
Check a lockfile for these releases →| Package | Registry | Versions |
|---|---|---|
| easy-day-js | npm | 1.11.22 |
| mastra | npm | 1.13.1 |
| @mastra/core | npm | 1.42.1 |
| create-mastra | npm | 1.13.1 |
| @mastra/mcp | npm | 1.10.1 |
| @mastra/mcp-docs-server | npm | 1.1.47 |
| @mastra/mcp-registry-registry | npm | 1.0.2 |
- https://www.microsoft.com/en-us/security/blog/2026/06/17/postinstall-payload-inside-mastra-npm-supply-chain-compromise/ · Microsoft Threat Intelligence, 2026-06-17
- https://stepsecurity.io/blog/mastra-npm-packages-compromised-using-easy-day-js · StepSecurity, 2026-06-17
- https://github.com/mastra-ai/mastra/issues/18045 · mastra-ai/mastra (GitHub), 2026-06-17
- https://osv.dev/vulnerability/MAL-2026-5965 · OpenSSF Malicious Packages (via OSV), 2026-06-17
Written up from the sources above and last checked on 2026-11-18. ShieldMap describes what was affected and what to do; it does not publish the malicious code or how it worked. Report a correction to [email protected].