How 144 Mastra npm Packages Got Poisoned in Under an Hour And Nobody Noticed Until It Was Too Late
A typosquatted dependency compromised 144 Mastra npm packages in under an hour, dropping an infostealer that went unnoticed until it was too late.
Overview
On June 17, 2026, 144 Mastra npm packagesA reusable web code library published to the public npm registry for developers to install were compromised in a single hour. The attack used easy-day-js, a typosquatted dependencyAn external code library or package that a software project relies on to do part of its work, to install a cross-platform infostealerMalware built to quietly copy saved passwords, browser cookies, and wallet keys from an infected device. This event affected the Mastra ecosystem and anyone relying on those specific software components. The speed of the compromise meant that detection came only after the damage was done. The incident highlights the risk of malicious code entering through trusted package managers. Users of the affected packages are now exposed to data theft.
Terms in this story
- npm Packages
- A reusable web code library published to the public npm registry for developers to install. Web developers pull in dozens of npm packages when building a site, and attackers frequently publish malicious packages with lookalike names to steal developer credentials during installation. Security+ objective 2.2 lists the term
- dependency
- An external code library or package that a software project relies on to do part of its work. When a popular open-source dependency has a security bug or gets hijacked by an attacker, every application that imports that package inherits the risk.
- infostealer
- Malware built to quietly copy saved passwords, browser cookies, and wallet keys from an infected device. Victims often download an infostealer through a fake game crack or malicious ad, and the stolen login cookies are then sold to ransomware crews on criminal markets. Security+ objective 2.4 lists the term
This page is a short description made for this site. The article itself, with its author's name and its own link, is on the The CyberSec Guru website. Cite the article, not this page.
Read the full article on The CyberSec Guru (opens in a new tab)
Course connections
Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.
- Kind of story: Breach or attack
"144 Mastra npm packages were compromised..." Found by reading the article; these exact words are in it - Who is affected: "...npm Packages..."
Copied word for word from the article - Security+ 2.2 Explain common threat vectors and attack surfaces.
"How 144 Mastra npm Packages Got Poisoned in Under an Hour And..." Found in the headline - Security+ 2.4 Given a scenario, analyze indicators of malicious activity.
"......a typosquatted dependency that drops a cross-platform infostealer This post first appeared at - The..." Found in the opening sentences - CYBR 101 week 9: malware, indicators and how detection works
"......a typosquatted dependency that drops a cross-platform infostealer This post first appeared at - The..." Found in the opening sentences - Job skill (from the U.S. Department of Defense list of cybersecurity jobs): Knowledge of Post-Exploitation TTPs (e.g. data exfiltration, privilege escalation, operational prep of the environment).
"...drops a cross-platform infostealer..." Found by reading the article; these exact words are in it - Job skill (from the U.S. Department of Defense list of cybersecurity jobs): Manage dependencies and risks.
"144 Mastra npm packages were compromised..." Found by reading the article; these exact words are in it
How a story is connected to the course, and every objective, week and job role