North Korean Hackers Compromise Mastra AI Framework via NPM Supply Chain Attack
North Korean state-sponsored hackers compromised the Mastra AI framework by gaining control of an NPM account and injecting malicious code into over 140 packages, which was discovered and remediated by Microsoft in June 2026.
What happened
On June 17, 2026, Microsoft disclosed an attack on the Mastra AI application framework. Hackers compromised the NPM account of developer ehindero, gaining publishing permissions for the @mastra namespace.
The attackers released a malicious package named easy-day-js that impersonated the legitimate dayjs library, then published compromised versions of over 140 NPM packages in the @mastra namespace with easy-day-js as a dependency.
The malicious code disabled TLS verification, cleared tracking marks, and established command-and-control communications to retrieve second-stage payloads. Microsoft notified NPM, which removed the affected packages and revoked the attacker's publishing permissions.
Reported impact
Users who installed the compromised packages would execute obfuscated malicious code, allowing attackers to disable security verification and establish unauthorized communications.
Index analysis
Microsoft attributed the attack to the North Korean hacking group known as BlueNoroff, UNC1069, or Sapphire Sleet. The same group was responsible for the April 2026 attack on Axios.
Classification
Sources and evidence
This record was researched and written by the Index, based on the following original reporting.