Microsoft links Mastra AI supply chain attack to North Korean hackers

**North Korean Hackers Hijack npm Packages, Steal Sensitive Data**

Imagine walking into a crowded supermarket and finding out that one of your favorite brands has been compromised by a group of thieves. That’s basically what happened with the Mastra AI package environment on npm (Node Package Manager), a massive repository of open-source code used by developers worldwide.

Microsoft has linked the recent supply chain attack to North Korean hackers, specifically the Sapphire Sleet group, also known as BlueNoroff[^1]. This group is notorious for targeting the financial sector. The attack was particularly sneaky: attackers hijacked an npm maintainer account called “ehindero,” which had publishing privileges across the Mastra package environment.

**How it went down**

The attackers used the compromised account to publish malicious updates for over 140 packages in the @mastra scope. These updates injected a fake dependency called “easy-day-js,” a clever typo of the popular dayjs JavaScript library. When developers installed these compromised packages, they unknowingly downloaded malware that aimed to steal sensitive credentials, API keys, authentication tokens, and even cryptocurrency wallets.

The malicious payload was designed to be cross-platform, targeting Windows, Linux, and macOS systems. Once executed, it collected information about the host, browser history, and other sensitive details. The attackers also managed to disable Transport Layer Security (TLS) certificate verification, making it easier for them to communicate with their command-and-control servers.

**Why this matters**

This attack highlights several worrying trends in the world of cybersecurity:

1. **Supply chain attacks are on the rise**: Attackers are increasingly targeting trusted third-party vendors and open-source code repositories like npm.
2. **North Korean hackers are getting bolder**: Sapphire Sleet’s involvement in this attack is a reminder that even state-sponsored groups can be unpredictable and sophisticated.
3. **Developers need to be more vigilant**: With the rise of software development platforms like npm, developers must stay alert for potential security threats lurking within package updates.

**What’s next?**

As the cybersecurity landscape continues to evolve, it’s essential for developers, organizations, and governments to work together to prevent such attacks. Will we see a massive overhaul of the way we handle open-source code and supply chain management? Only time will tell.

**Source:**
[^1]: Bleeping Computer – Microsoft links Mastra AI supply chain attack to North Korean hackers

https://www.bleepingcomputer.com/news/security/microsoft-links-mastra-ai-supply-chain-attack-to-north-korean-hackers/