Mastra npm Supply Chain Attack via easy-day-js
Score: 9/10

Mastra npm Supply Chain Attack via easy-day-js

Attacker sergey2016 compromised the @mastra npm organization to inject the easy-day-js typosquat dependency, delivering an obfuscated postinstall dropper.

Executive Summary

On June 17, 2026, a sophisticated supply chain attack targeted the Mastra AI framework on the npm registry. An attacker using the handle 'sergey2016' compromised the @mastra organization and added a malicious dependency, 'easy-day-js', to over 140 packages. This malicious package, a typosquat of the popular 'dayjs' library, contained an obfuscated postinstall script designed to download a second-stage payload from attacker-controlled infrastructure.

The attack was executed in stages, beginning with the publication of a 'clean' bait version to bypass initial scrutiny before updating to a malicious version (1.11.22). The malware specifically targeted high-value environments likely containing AI API keys and cloud credentials. By disabling TLS verification and using detached processes with self-deletion routines, the threat actor demonstrated a high level of tradecraft aimed at evading detection and forensic analysis.

Organizations using Mastra AI framework packages should immediately audit their environments for the presence of easy-day-js and treat any installation occurring on or after June 17, 2026, as compromised. The attack has significant implications for AI development pipelines, where sensitive environment variables are frequently exposed during build and deployment processes.

Key Details

Threat Name

Mastra npm Supply Chain Attack

Affects

—

Adversary

sergey2016

Malware/Tools

easy-day-js

Report Score

9out of 10
Quality Score
Excellent
IOC Quality9
TTP Details9
Detection Guidance6
Enterprise Relevance9
Clarity & Structure10
Technical Depth8