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.
