Microsoft has attributed a sophisticated software supply chain attack against the Mastra open-source project to Sapphire Sleet, a financially motivated North Korean state-sponsored threat actor. Also tracked as BlueNoroff and APT38, the group executed the attack on June 17, 2026, by compromising a developer's NPM account and publishing 141 malicious versions of packages associated with the Mastra AI framework. The malicious packages included a dependency designed to compromise developer machines, highlighting the increasing threat to the open-source ecosystem. Organizations using Mastra are urged to audit their dependencies, scan for compromise, and rotate all developer credentials.
The attack targeted the Mastra project, a popular TypeScript framework for building AI agents that receives millions of weekly downloads. The threat actor, Sapphire Sleet, gained access to the 'ehindero' NPM maintainer account, which provided them with the necessary permissions to publish new versions of the official Mastra packages.
The attackers then published malicious updates for 141 packages. These updates were poisoned with a malicious dependency named easy-day-js, a deliberate typosquat of the widely used and legitimate dayjs library. This technique is designed to trick developers and automated systems into pulling in the malicious code. Microsoft's attribution to Sapphire Sleet was made with "high confidence" based on infrastructure and TTPs consistent with the group's previous financially motivated campaigns, such as the April 2026 Axios supply chain attack.
The attack chain demonstrates a clear understanding of software development pipelines and open-source repository weaknesses.
T1078 - Valid Accounts.easy-day-js package from a separate, likely controlled account named 'sergey2016'. This may have been done to pre-populate the package in registries and bypass certain checks.easy-day-js as a dependency. This is a classic example of T1195.002 - Compromise Software Supply Chain.easy-day-js dependency, leading to code execution on the developer's machine. This falls under T1037 - Hijack Execution Flow.The primary goal was to compromise developer systems, which are high-value targets as they often contain access tokens, API keys, SSH keys, and other secrets that provide access to sensitive cloud and corporate infrastructure.
The compromise of a popular AI framework like Mastra has cascading effects throughout the software ecosystem.
file_nameeasy-day-jsotherehinderoothersergey2016Security teams should hunt for evidence of this compromise within their development environments:
file_namepackage-lock.jsoneasy-day-js within this file across all projects.file_pathnode_modules/easy-day-js directory.command_line_patternnpm ls easy-day-jsnetwork_traffic_patternOrganizations should focus on securing their software development lifecycle (SDLC).
npm audit) in CI/CD pipelines to detect known malicious packages. Tools from Socket, Sonatype, and others offer advanced detection capabilities.D3FEND Techniques:
File Analysis (D3-FA): Analyzing the contents of package.json and package-lock.json files for suspicious dependencies.Software Update (D3-SU): While the attack vector was an update, a proper defensive process involves verifying updates before application. Using tools that vet package sources and signatures is a key part of a secure update process.To prevent and mitigate similar supply chain attacks, organizations should:
npm-vet or similar tools: Use security tools that can detect typosquatting, dependency confusion, and other package-based threats.D3FEND Techniques:
Multi-factor Authentication (D3-MFA): To protect developer and maintainer accounts from takeover.Application Configuration Hardening (D3-ACH): Configuring package managers to use trusted, internal registries where packages are vetted before being made available to developers.Securing developer accounts on NPM and GitHub with MFA prevents account takeovers.
Mapped D3FEND Techniques:
Verifying the signatures of software packages before installation can help detect tampering.
While the attack vector was an update, having a robust and secure software update process that includes verification is a key mitigation.
Mapped D3FEND Techniques:
A clean version of the malicious 'easy-day-js' package was published from the 'sergey2016' account.
Sapphire Sleet uses the compromised 'ehindero' NPM account to publish 141 malicious Mastra packages.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
Help others stay informed about cybersecurity threats
Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.
Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.
Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.
Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.
Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.