From package to postinstall payload: Inside the Mastra npm supply chain compromise
Mastra npm supply chain attack poisoned 140+ packages with malicious payload via account takeover.
A large-scale npm supply chain attack compromised over 140 packages within the Mastra ecosystem by taking over a maintainer account. The attacker introduced a malicious typosquat package, 'easy-day-js', which, upon installation, executed a dropper script disabling TLS verification and downloading a second-stage payload. This attack potentially exposed developer workstations and CI/CD pipelines.
AI summary of the linked source. Not reviewed by an editor. How this works
Run Microsoft?
Get an email when a new story names Microsoft, usually within the hour.
Free. Your list stays private and never appears in a subject line. One click stops it. How Vendor Watch worksPrivacy
The lesson from this incident
Full lessonAttackers gained control of a legitimate npm maintainer account and injected malicious code into over 140 packages within the Mastra ecosystem, demonstrating how a single compromised identity can have cascading downstream effects. The attack leveraged a typosquat package ('easy-day-js') that disabled TLS verification and fetched a second-stage payload, meaning developers and CI/CD pipelines silently executed attacker-controlled code upon package installation. This matters because modern software development heavily trusts the open-source package ecosystem, and a compromised maintainer account bypasses most traditional security controls. The disabling of TLS verification is particularly dangerous as it opens the door to further man-in-the-middle attacks and credential theft on developer workstations.
What helps against this
How we list vendors- Secrets management
API keys, tokens and passwords stop leaking from code, chat and configuration files.
- Endpoint detection and response (EDR and XDR)
Malware and hands-on-keyboard attackers on laptops and servers get spotted and stopped.
- Software supply chain security
Malicious and vulnerable open-source packages are caught before they ship.
Indicators of Compromise
Extracted by AI from the linked source. Not reviewed by an editor. How this works
- malware — easy-day-js
- domain — tutamail.com