From package to postinstall payload: Inside the Mastra npm supply chain compromise
June 18, 2026, 2:32 p.m.
Description
Microsoft Threat Intelligence discovered a large-scale npm supply chain attack compromising over 140 packages in the mastra and @mastra scopes. The attack originated from takeover of the ehindero npm maintainer account, which published poisoned package versions introducing easy-day-js, a malicious typosquat of the popular dayjs library. The malicious package executed a postinstall hook that deployed an obfuscated dropper script, disabled TLS certificate verification, contacted command-and-control infrastructure at 23.254.164.92 and 23.254.164.123, and downloaded a second-stage payload. This 41KB cross-platform Node.js implant installed persistence mechanisms, performed cryptocurrency wallet inventory, exfiltrated browser history and host reconnaissance data, and on Windows performed reflective .NET assembly injection for fileless in-memory code execution. Any developer workstation or CI/CD pipeline executing npm install after compromise was potentially exposed regardless of code usage.
Tags
Date
- Created: June 18, 2026, 5:41 a.m.
- Published: June 18, 2026, 5:41 a.m.
- Modified: June 18, 2026, 2:32 p.m.
Indicators
- ae70dd4f6bc0d1c8c2848e4e6b51934626c4818dcb5af99d080ddbd7dc337185
- 4a8860240e4231c3a74c81949be655a28e096a7d72f38fbe84e5b37636b98417
- b122a9873bedf145ae2a7fd024b5f309007dbb025149f4dc4ac3f7e4f32a36a4
- b73de25c053c3225a077738a1fcbd9ca6966d7b3cd6f5494a30f0aa0eae55c7e
- 221c45a790dec2a296af57969e1165a16f8f49733aeab64c0bbd768d9943badf
- https://23.254.164.92:8000/update/49890878
Additional Informations
- Technology