Microsoft has linked the recent supply chain attack targeting the Mastra AI ecosystem to a North Korean threat group known as Sapphire Sleet. The attack affected the popular Mastra AI framework, which is widely used by developers to build AI agents, workflows, and automation tools. According to Microsoft, the attackers compromised the software supply chain to secretly distribute malicious code through trusted packages.

The incident came to light after security researchers discovered suspicious changes in several packages published under the Mastra npm ecosystem. Investigations showed that attackers had gained access to publishing accounts and modified packages that developers regularly download. This allowed malicious code to spread through software updates that appeared legitimate.
Microsoft said more than 140 packages were impacted during the attack. Many of these packages are widely used within AI development environments, creating a significant risk for organizations and developers who installed the affected versions. The compromised packages collectively reached more than a million downloads, increasing the potential impact of the campaign.

Researchers found that the attackers introduced a malicious dependency called “easy-day-js,” a fake package designed to resemble the legitimate “dayjs” library. This technique, known as typosquatting, tricks developers and automated systems into trusting a malicious package because its name closely resembles a popular and trusted dependency.
The malicious package contained an obfuscated post-installation script that executed automatically when the software was installed. Once activated, the script downloaded additional payloads from attacker-controlled infrastructure and attempted to establish persistence on compromised systems. Security researchers noted that the malware was designed to remove traces of its activity after execution, making detection more difficult.

Microsoft’s threat intelligence team analyzed the attack infrastructure, techniques, and operational patterns before attributing the campaign to Sapphire Sleet. The company stated that the methods used during the operation closely matched previous activities associated with the North Korean threat actor. Sapphire Sleet has been linked to cyber espionage operations, financial theft campaigns, and attacks targeting software supply chains.
The main objective of the campaign appears to have been the theft of sensitive information from developer environments. Researchers warned that affected systems may have exposed cloud credentials, AI service tokens, source code repositories, and other valuable secrets stored on developer workstations or within CI/CD environments. Organizations using the compromised packages have been advised to investigate their systems immediately.

Microsoft and security researchers recommend removing affected package versions, rotating credentials, reviewing system logs, and rebuilding environments where compromise is suspected. The incident highlights the growing focus of nation-state threat actors on open-source software ecosystems and AI development platforms. As organizations increasingly depend on third-party packages, supply chain security continues to become one of the most critical challenges facing the cybersecurity industry today.
Stay alert, and keep your security measures updated!
Source: Follow cybersecurity88 on X and LinkedIn for the latest cybersecurity news