Back to Feed
Supply ChainJun 22, 2026

North Korean Hackers Blamed for Mastra NPM Supply Chain Attack

North Korean hackers targeted Mastra NPM packages with a malicious dependency.

Summary

North Korean state-sponsored threat actor Sapphire Sleet compromised over 140 Mastra NPM packages by injecting a malicious dependency called 'easy-day-js'. The attack, which occurred over a 45-minute window, targeted developers and CI/CD pipelines, aiming to steal cryptocurrency information. The malware was designed to collect system data and target over 160 cryptocurrency-related browser extensions across Windows, macOS, and Linux.

Full text

The North Korean state-sponsored threat actor Sapphire Sleet is behind the Mastra supply chain attack that hit over 140 NPM packages last week, Microsoft reports. Mastra is an open source TypeScript framework for building AI agents, workflows, and RAG pipelines. It offers integrations for major LLM providers, MCP servers, and cloud deployments. The supply chain attack occurred on June 17. During a 45-minute window, the hackers published 141 packages that contained the malicious dependency easy-day-js, a typosquat of the legitimate dayjs date library. The affected Mastra packages have approximately 8 million weekly downloads. All users who installed a @mastra package during the attack window on June 17 should consider their systems affected. As part of the attack, the hackers compromised the ‘ehindero’ NPM maintainer account, which has publishing rights across the Mastra ecosystem. One day before the account takeover, the attackers published a clean version of easy-day-js to a separate account, ‘sergey2016’. The threat actor used the compromised maintainer account to add easy-day-js as a dependency to 141 NPM packages across the Mastra ecosystem, in such a manner that the latest version of the library would always be installed, and then published the modified packages to NPM.Advertisement. Scroll to continue reading. Simultaneously, they published a new, malicious version of the easy-day-js library to their account. An obfuscated postinstall dropper in the dependency would fetch a second-stage payload from the attackers’ servers, write it to the temp directory, execute it as a detached, hidden background process, and then delete itself to hide its tracks. “Because the payload executes during installation, any developer workstation or continuous integration and continuous delivery (CI/CD) pipeline that ran npm install or npm update after the compromised versions were published was potentially exposed, regardless of whether the package was imported in application code,” Microsoft says. Targeting Windows, macOS, and Linux, the malware was designed to masquerade as node-related tools while collecting system information and targeting more than 160 cryptocurrency-related browser extensions. Microsoft has attributed the attack to the financially motivated North Korean group Sapphire Sleet, also known as BlueNoroff, CageyChameleon, Copernicium, and Stardust Chollima, which was also blamed for the Axios supply chain attack. In April, hackers published modified versions of the Axios NPM library that were pointing to a phantom dependency designed to download and execute a cross-platform RAT. Google’s Threat Intelligence Group attributed the attack to UNC1069. Mastra users are advised to remove the affected package versions, check their systems for malware, rotate credentials, tokens, and other secrets, and harden access to their crypto-wallets. Cybersecurity firms Aikido, Ox, Socket, Sonatype, and StepSecurity have published technical details and indicators of compromise (IoCs) associated with the Mastra supply chain attack. Related: More Cybersecurity Firms Disclose Impact From Klue Hack Related: CryptoBandits Malware Doubles as a Backdoor, Abuses Tor Related: NPM 12 Will Change Script Execution Behavior to Prevent Supply Chain Attacks Related: Supply Chain Attack Hits 32 Red Hat NPM Packages Written By Ionut Arghire Ionut Arghire is an international correspondent for SecurityWeek. Daily Briefing Newsletter Subscribe to the SecurityWeek Email Briefing for the latest cybersecurity threats, trends, and expert insights. More from Ionut Arghire CryptoBandits Malware Doubles as a Backdoor, Abuses TorFortiBleed: 86,000 Fortinet Device Credentials CompromisedCybersecurity Firms Impacted by Klue Supply Chain Attack15,000 WordPress Websites Cleaned Up in SocGholish Botnet Takedown Majority of Internet-Accessible REDCap Servers OutdatedDream Raises $260 Million at $3 Billion ValuationAtlassian, Splunk Patch Critical VulnerabilitiesCritical Command Execution Vulnerability Patched in Cisco ISE Latest News Attackers Exploit Gravity SMTP Plugin Flaw to Harvest Valuable WordPress DataWhat the Latest ShinyHunters Breaches Reveal About Modern CyberattacksNew Exploit Bypasses Apple’s Boot Defenses, Affects Millions of iPhonesFortinet Responds to FortiBleed CampaignMore Cybersecurity Firms Disclose Impact From Klue HackTexas Parks & Wildlife Data Breach Affects 3 Million IndividualsFrench President Urges US to Share Cutting-Edge AI and Democracies to Cooperate on RegulationIn Other News: Apple Patches Beats Eavesdropping Flaw, DOT Closes Delta CrowdStrike Probe, AWS Continuum Trending Daily Briefing NewsletterSubscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts. Webinar: How Modern Breaches Bypass MFA and Evade Detection June 17, 2026 Today’s attackers are no longer breaking in — they’re logging in. Join this live webinar as we break down the modern identity attack chain and examine how recent breaches exploited weaknesses in authentication, identity verification, and access management processes. Register Webinar: Modern Exposure Validation in the AI Era June 24, 2026 AI has accelerated both sides of the fight. Adversaries are weaponizing vulnerabilities faster, while defenders are racing to ship detections and configurations. Join this live webinar as we explore how to prove your controls actually hold against new threats, map your security maturity, and unite breach simulation with automated pentesting into a single, coordinated program. Register People on the MoveSolarWinds has appointed Justin Henkel as Chief Information Security Officer.J. Paul Haynes has joined Cinchy as Chief Executive Officer.Hatem Naguib has become Chief Executive Officer at Sysdig.More People On The MoveExpert Insights What the Latest ShinyHunters Breaches Reveal About Modern Cyberattacks Groups like ShinyHunters are demonstrating that attackers do not necessarily need malware or zero-day exploits to cause massive damage. (Torsten George) No Exploits Required Four decades of incident response experience suggest that exploits are often the symptom, not the root cause, of today’s cybersecurity failures. (Tod Beardsley) After AI Reaches Production: 12 Ways Security Teams Can Take Control Security teams need more than visibility into AI applications, they need a repeatable framework for monitoring, investigating, and defending them in production. (Joshua Goldfarb) Everybody Is Vibe Coding But Nobody Told the Security Team AI-driven development is not something organizations can or should block. But it must be governed. (Danelle Au) The Zero-Knowledge Threat Actor and the End of Responsible Disclosure AI can help attackers generate malware, create malicious payloads, bypass simple security checks, and convert vague malicious intent into functional code. (Etay Maor) Flipboard Reddit Whatsapp Whatsapp Email

Indicators of Compromise

  • malware — easy-day-js
  • mitre_attack — T1071.001
  • mitre_attack — T1059.003
  • mitre_attack — T1105
  • mitre_attack — T1070.004
  • mitre_attack — T1552.001
  • mitre_attack — T1041

Entities

Sapphire Sleet (threat_actor)BlueNoroff (threat_actor)CageyChameleon (threat_actor)Copernicium (threat_actor)Stardust Chollima (threat_actor)UNC1069 (threat_actor)