A Trusted Ecosystem Turned Into a Weapon

Software supply chains have long been recognized as one of the most dangerous attack surfaces in modern cybersecurity — and North Korean state actors have now demonstrated, with alarming precision, just how devastating a single compromised maintainer account can be. A coordinated intrusion into the Mastra AI npm ecosystem has been formally attributed to Sapphire Sleet, a prolific Pyongyang-backed threat group with a well-documented appetite for financial theft and cryptocurrency plunder.

Threat Intelligence: Software supply chains have long been recognized as one of the most dangerous attack surfaces in modern cybersecurity — and North Korean state actors have now demonstrated, with alarming precision, just how devastating a single compromised maintainer account can be.

The operation was surgical in its setup and broad in its reach. By seizing control of a single npm maintainer account — one with publishing rights across the entire Mastra package scope — the attackers were able to distribute malicious code updates to more than 140 packages simultaneously, turning a trusted developer toolchain into an active malware delivery platform.

Anatomy of the Attack: Typosquatting, Droppers, and Hidden Processes

The initial foothold was the compromised npm account belonging to maintainer handle ehindero. With that access secured, the threat actors introduced a malicious dependency called easy-day-js — a deliberate typosquat of dayjs, one of the most widely used JavaScript date utility libraries. For developers installing packages in the @mastra scope, the substitution would be nearly invisible at a glance.

From there, the attack followed a sophisticated multi-stage execution chain:

Anatomy of the Attack: Typosquatting, Droppers, and Hidden Processes
Post-install hook activation: Upon package installation, the malicious dependency automatically triggered a post-install script — a native npm feature routinely used by legitimate packages — executing an obfuscated dropper without any user interaction.
TLS certificate verification disabled: The dropper intentionally bypassed Transport Layer Security certificate checks, clearing the path for communication with attacker-controlled infrastructure without triggering standard certificate validation alarms.
Command-and-control contact: The infected host reached out to remote C2 servers to retrieve a second-stage payload, which was then launched as a detached hidden process to avoid casual detection.

Cross-Platform Stealer With a Cryptocurrency Focus

The second-stage payload was not a crude, opportunistic tool — it was a purpose-built, cross-platform information stealer engineered to operate across Windows, Linux, and macOS environments. This cross-platform capability is consistent with Sapphire Sleet's history of targeting developer workstations, which frequently run heterogeneous operating systems.

Once active, the implant conducted extensive reconnaissance, harvesting browser histories, cataloging installed applications, and enumerating running processes. Its most targeted function, however, was the scanning of 166 distinct cryptocurrency wallet browser extensions — including MetaMask, Phantom, Coinbase Wallet, Binance Wallet, and TronLink — alongside the theft of API keys, authentication tokens, and stored credentials.

The malware's ability to check for 166 specific wallet extensions reflects not opportunism, but a deliberate, intelligence-driven targeting strategy aimed squarely at the developer and crypto-native community.

Persistence mechanisms were tailored per operating system: Windows Registry Run keys for Windows machines, LaunchAgents for macOS, and systemd services for Linux. Compromised systems that communicated with C2 infrastructure also showed evidence of follow-on activity, including deployment of a known Sapphire Sleet PowerShell backdoor, escalation to SYSTEM privileges via a malicious Windows service, and Microsoft Defender exclusion entries designed to blind endpoint defenses.

Sapphire Sleet: A Pattern of Supply Chain Aggression

Sapphire Sleet — also tracked under the alias BlueNoroff — is not a novice operation. The group has been consistently linked to large-scale cryptocurrency theft, fake recruitment lure campaigns, malicious browser extensions, and software supply chain compromises. This attack marks at least the second confirmed npm supply chain intrusion attributed to the group in 2026 alone, following a similar operation targeting the Axios HTTP client library in April.

The escalating cadence of supply chain attacks from this actor signals a strategic priority shift: rather than targeting end-user organizations directly, Sapphire Sleet is moving upstream — infecting the tools that developers build products with, multiplying the potential victim pool exponentially.

What You Should Do

For security teams, developers, and engineering leaders, this incident carries immediate and actionable implications:

  • Audit npm dependencies immediately: Any project consuming packages from the @mastra scope should be treated as potentially compromised. Conduct a full dependency audit and review post-install scripts for unexpected behavior.
  • Rotate all exposed credentials: If affected packages were installed in any development or CI/CD environment, rotate API keys, authentication tokens, and any secrets accessible from those systems without delay.
  • Check for persistence indicators: Investigate systems for Registry Run key modifications, LaunchAgent entries, systemd service additions, and Defender exclusion changes consistent with this campaign's known TTPs.
  • Enforce maintainer account MFA: Supply chain attacks consistently exploit weak or stolen account credentials. Multi-factor authentication on all package registry accounts is non-negotiable.
  • Implement dependency pinning and integrity verification: Use lockfiles, integrity hashes, and software composition analysis (SCA) tools to detect unexpected changes in transitive dependencies before they reach production.
  • Monitor outbound connections from build environments: Post-install hooks that initiate network connections to external hosts are a significant red flag. Build pipelines should operate with network egress restrictions wherever possible.

The Bigger Picture

This campaign is a reminder that the software supply chain is not merely a technology risk — it is a geopolitical one. Nation-state actors with the resources and patience of Sapphire Sleet are actively mapping the dependencies that underpin critical development infrastructure. A single maintainer credential is all it takes to transform a trusted package into a persistent foothold across thousands of developer machines worldwide. The industry's collective approach to package trust, account security, and dependency hygiene must evolve at the same pace as the threats targeting it.