{"investigation":{"slug":"mastra-ai-npm-supply-chain-attack-june-2026","entity_name":"Mastra AI npm Supply Chain Attack (June 2026)","trust_score":0,"severity_base":null,"score_modifier":-30,"confidence":0.95,"status":"under_investigation","content_type":"investigation","summary":"On June 16-17, 2026, attackers published a typosquatted npm package, easy-day-js, imitating the dayjs date library, then used the hijacked 'ehindero' account, which held never-revoked publish rights, to inject it as a dependency into 140+ packages in the @mastra npm scope within about 88 minutes. The malicious postinstall payload was a cross-platform remote access trojan and infostealer that inventoried 166 cryptocurrency wallet extensions and harvested browser data, LLM API keys, cloud and CI/CD secrets before deleting itself; affected packages had more than 1.1 million combined weekly downloads by the most-cited estimate. Mastra and npm unpublished or superseded the malicious versions within hours; attribution remains unconfirmed, though researchers note overlaps with North Korea-linked Sapphire Sleet tradecraft.","sections":[{"content":"The Mastra AI npm supply chain attack was a two-phase operation on June 16-17, 2026 against the npm organisation (@mastra) of the Mastra AI agent framework. Attackers first published 'easy-day-js', a typosquatted impersonator of the widely used 'dayjs' date library, as a clean package to build a credible history. They then used 'ehindero', a compromised contributor account with never-revoked publishing rights to the whole @mastra scope, to run an automated campaign between 01:12 and 02:39 UTC on June 17 (about 88 minutes) that republished 140 or more @mastra packages, each with one new dependency: easy-day-js. The @mastra package code itself was not modified; only a dependency line was added, which made the change hard to spot in routine review. Because the dependency was declared with caret notation ('^1.11.21'), npm's semantic-version resolution pulled the armed 'easy-day-js@1.11.22' on any fresh install without changes to downstream package.json files. No vulnerability in npm software was exploited; the attack relied on social engineering, stale access management and ecosystem trust mechanisms.","heading":"Attack Overview","sources":[{"url":"https://www.ox.security/blog/easy-day-js-supply-chain-attack-hits-mastra-ai-in-npm/","name":"OX Security: easy-day-js Supply Chain Attack Hits Mastra AI in npm","type":"research","credibility":2},{"url":"https://www.stepsecurity.io/blog/mastra-npm-packages-compromised-using-easy-day-js","name":"StepSecurity: Mastra npm Supply Chain Attack — 140+ Packages Backdoored via easy-day-js","type":"research","credibility":2},{"url":"https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/","name":"Snyk: A forgotten contributor account compromised the entire Mastra npm package scope","type":"research","credibility":2},{"url":"https://thehackernews.com/2026/06/144-mastra-npm-packages-compromised-via.html","name":"The Hacker News: 145 Mastra npm Packages Compromised via Hijacked Contributor Account","type":"news_article","credibility":2},{"url":"https://socket.dev/blog/mastra-npm-packages-compromised","name":"140+ Mastra npm Packages Compromised in Coordinated Supply Chain Attack — Socket","type":"research","credibility":2}],"severity":"critical"},{"content":"The 'ehindero' account had legitimately published early alpha versions of @mastra/core in late 2024 and early 2025, acquiring publish rights across the @mastra scope that were never revoked, and had been dormant for approximately 16 months before the attack. npm has no built-in policy for expiring scope publish permissions on inactive accounts, so this single stale credential was enough to publish to every package in the scope. According to Snyk, the attacker changed the account's email to 'ehindero2016@tutamail.com', indicating a full account takeover rather than token theft alone or malicious action by the original contributor.\n\nAccounts differ on who was compromised. Snyk and other researchers describe a dormant former contributor's account. Mastra's official incident report (GitHub issue #18061) states that the compromised maintainer was an active Mastra employee whose account was compromised through social phishing: a fraudulent LinkedIn message led the maintainer to click a suspicious link while on a call, exposing credentials used to access internal tooling.\n\nA separate npm account, 'sergey2016' (sergey2016@tutamail.com), published the easy-day-js package. An npm MFA token-bypass setting allowed the attacker to publish without satisfying multi-factor authentication.","heading":"Initial Access: Compromised Account and Stale Permissions","sources":[{"url":"https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/","name":"Snyk: A forgotten contributor account compromised the entire Mastra npm package scope","type":"research","credibility":2},{"url":"https://www.endorlabs.com/learn/mastra-npm-org-compromised-multiple-packages-trojanized-to-drop-a-remote-payload-via-easy-day-js","name":"Endor Labs: Mastra npm Org Compromised — Multiple Packages Trojanized","type":"research","credibility":2},{"url":"https://thehackernews.com/2026/06/144-mastra-npm-packages-compromised-via.html","name":"The Hacker News: 145 Mastra npm Packages Compromised via Hijacked Contributor Account","type":"news_article","credibility":2},{"url":"https://github.com/mastra-ai/mastra/issues/18061","name":"Mastra GitHub Issue #18061 — Official Incident Report","type":"official","credibility":1}],"severity":"critical"},{"content":"Version 1.11.21 of easy-day-js, published by sergey2016 on June 16, 2026 at 07:05 UTC, was a complete, functional, byte-identical copy of dayjs with no malicious code, intended to establish a credible package history and pass superficial automated checks. Version 1.11.22, published on June 17, 2026 at 01:01 UTC and tagged 'latest', added an obfuscated postinstall dropper, 'setup.cjs' (4,572 bytes), run through the hook 'postinstall: node setup.cjs --no-warnings'. The obfuscation used three layers: a custom-alphabet Base64 encoding, array rotation requiring an exact 34-position shift for integrity validation, and XOR-encoded beacon markers. Twenty-six minutes after 1.11.22 was published, the ehindero account began mass-publishing the trojanised Mastra packages.","heading":"Malicious Package: easy-day-js Typosquat","sources":[{"url":"https://www.stepsecurity.io/blog/mastra-npm-packages-compromised-using-easy-day-js","name":"StepSecurity: Mastra npm Supply Chain Attack — 140+ Packages Backdoored via easy-day-js","type":"research","credibility":2},{"url":"https://research.jfrog.com/post/easy-day-js/","name":"easy-day-js: Supply Chain Campaign Targets Mastra npm Packages — JFrog Security Research","type":"research","credibility":2},{"url":"https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/","name":"Snyk: A forgotten contributor account compromised the entire Mastra npm package scope","type":"research","credibility":2},{"url":"https://www.endorlabs.com/learn/mastra-npm-org-compromised-multiple-packages-trojanized-to-drop-a-remote-payload-via-easy-day-js","name":"Endor Labs: Mastra npm Org Compromised — Multiple Packages Trojanized","type":"research","credibility":2}],"severity":"critical"},{"content":"Stage 1 (setup.cjs) was a lightweight loader that ran at install time. It disabled TLS certificate validation by setting NODE_TLS_REJECT_UNAUTHORIZED=0, wrote installation beacons ('.pkg_history' and '.pkg_logs'), fetched the second stage from 'https://23.254.164.92:8000/update/49890878' (Hostwinds, ASN AS54290), spawned a detached background process and then deleted itself with 'fs.rmSync(__filename)' to remove forensic evidence.\n\nStage 2 ('protocal.cjs', about 41 KB) was a cross-platform Node.js remote access trojan that communicated with a second C2 server at 23.254.164.123 on port 443, beaconing approximately every 10 minutes. Its capabilities included system fingerprinting (OS, architecture, Node.js version, running processes), hostname enumeration, extraction of browser history and stored credentials from Chrome, Brave and Edge, an inventory of 166 cryptocurrency wallet browser extensions, and theft of LLM API keys, cloud provider credentials, CI/CD tokens and database connection strings. It installed persistence under the name NvmProtocal on all three platforms (a LaunchAgent on macOS, a systemd user service on Linux and an HKCU Run registry key on Windows) and registered signal handlers to reinstall persistence if the process was killed.","heading":"Malicious Payload: Two-Stage RAT and Infostealer","sources":[{"url":"https://www.stepsecurity.io/blog/mastra-npm-packages-compromised-using-easy-day-js","name":"StepSecurity: Mastra npm Supply Chain Attack — 140+ Packages Backdoored via easy-day-js","type":"research","credibility":2},{"url":"https://www.endorlabs.com/learn/mastra-npm-org-compromised-multiple-packages-trojanized-to-drop-a-remote-payload-via-easy-day-js","name":"Endor Labs: Mastra npm Org Compromised — Multiple Packages Trojanized","type":"research","credibility":2},{"url":"https://www.microsoft.com/en-us/security/blog/2026/06/17/postinstall-payload-inside-mastra-npm-supply-chain-compromise/","name":"Microsoft Security Blog: From package to postinstall payload — Inside the Mastra npm supply chain compromise","type":"research","credibility":1},{"url":"https://phoenix.security/easy-day-js-mastra-npm-supply-chain-typosquat-rat-2026/","name":"Phoenix Security: easy-day-js / EASY_DAY_JS_MASTRA_2026","type":"research","credibility":2},{"url":"https://research.jfrog.com/post/easy-day-js/","name":"easy-day-js: Supply Chain Campaign Targets Mastra npm Packages — JFrog Security Research","type":"research","credibility":2},{"url":"https://socket.dev/blog/mastra-npm-packages-compromised","name":"140+ Mastra npm Packages Compromised in Coordinated Supply Chain Attack — Socket","type":"research","credibility":2}],"severity":"critical"},{"content":"Researchers give different counts of compromised packages: 141 per OX Security and StepSecurity, 143 per JFrog, 144 per Snyk and The Hacker News, with some reporting up to 145 depending on counting method. Affected packages included core infrastructure packages, database adapters and integration modules; @mastra/core alone recorded over 918,000 weekly downloads at the time. The most heavily downloaded affected packages included @mastra/schema-compat (5.3M monthly), @mastra/core (4M monthly), mastra (2.1M monthly), @mastra/memory (2M monthly) and @mastra/server (1.8M monthly).\n\nReported download totals also differ. StepSecurity and Socket report combined weekly downloads of more than 1.1 million across the compromised packages. OX Security reports approximately 8,031,590 combined weekly downloads and approximately 29,230,561 monthly downloads, while other researchers cite more than 28 million monthly.\n\nAny developer workstation, CI runner or build environment that ran npm install on an affected @mastra package during the exposure window, without a committed lockfile or install-script blocking, may have executed the dropper. Mastra packages are routinely installed in environments holding LLM API keys, cloud credentials, CI/CD tokens, SSH keys and database connection strings. All republished compromised versions lacked SLSA provenance attestations, which distinguishes them from legitimate releases.","heading":"Scale and Exposure","sources":[{"url":"https://orca.security/resources/blog/mastra-npm-supply-chain-attack/","name":"Orca Security: 144 Mastra npm Packages Compromised via Supply Chain Attack","type":"research","credibility":2},{"url":"https://thehackernews.com/2026/06/144-mastra-npm-packages-compromised-via.html","name":"The Hacker News: 145 Mastra npm Packages Compromised via Hijacked Contributor Account","type":"news_article","credibility":2},{"url":"https://www.endorlabs.com/learn/mastra-npm-org-compromised-multiple-packages-trojanized-to-drop-a-remote-payload-via-easy-day-js","name":"Endor Labs: Mastra npm Org Compromised — Multiple Packages Trojanized","type":"research","credibility":2},{"url":"https://www.ox.security/blog/easy-day-js-supply-chain-attack-hits-mastra-ai-in-npm/","name":"OX Security: easy-day-js Supply Chain Attack Hits Mastra AI in npm","type":"research","credibility":2},{"url":"https://research.jfrog.com/post/easy-day-js/","name":"easy-day-js: Supply Chain Campaign Targets Mastra npm Packages — JFrog Security Research","type":"research","credibility":2},{"url":"https://www.stepsecurity.io/blog/mastra-npm-packages-compromised-using-easy-day-js","name":"StepSecurity: Mastra npm Supply Chain Attack — 140+ Packages Backdoored via easy-day-js","type":"research","credibility":2},{"url":"https://socket.dev/blog/mastra-npm-packages-compromised","name":"140+ Mastra npm Packages Compromised in Coordinated Supply Chain Attack — Socket","type":"research","credibility":2}],"severity":"critical"},{"content":"The stage-2 payload enumerated 166 cryptocurrency wallet browser extension IDs across Chrome, Brave and Edge profiles. Named targets include MetaMask, Phantom, Solflare, Coinbase Wallet and Binance wallet extensions. The full wallet inventory was sent to attacker infrastructure on the first beacon, before any user interaction, allowing operators to identify victims with valuable holdings and deliver targeted follow-on modules for credential extraction. Mastra is widely used in AI agent and automation pipelines that interact with blockchain infrastructure, including DeFi protocols, wallet management systems and on-chain tooling, raising the risk that compromised environments expose operational crypto assets, not only personal developer wallets. Researchers at JFrog, Socket, StepSecurity, Snyk and OX Security recommend treating any affected machine with wallet extensions as fully compromised: move funds to fresh wallets generated on a clean device and rotate all credentials in the environment.","heading":"Cryptocurrency Wallet Targeting","sources":[{"url":"https://orca.security/resources/blog/mastra-npm-supply-chain-attack/","name":"Orca Security: 144 Mastra npm Packages Compromised via Supply Chain Attack","type":"research","credibility":2},{"url":"https://phoenix.security/easy-day-js-mastra-npm-supply-chain-typosquat-rat-2026/","name":"Phoenix Security: easy-day-js / EASY_DAY_JS_MASTRA_2026","type":"research","credibility":2},{"url":"https://www.stepsecurity.io/blog/mastra-npm-packages-compromised-using-easy-day-js","name":"StepSecurity: Mastra npm Supply Chain Attack — 140+ Packages Backdoored via easy-day-js","type":"research","credibility":2},{"url":"https://research.jfrog.com/post/easy-day-js/","name":"easy-day-js: Supply Chain Campaign Targets Mastra npm Packages — JFrog Security Research","type":"research","credibility":2},{"url":"https://socket.dev/blog/mastra-npm-packages-compromised","name":"140+ Mastra npm Packages Compromised in Coordinated Supply Chain Attack — Socket","type":"research","credibility":2},{"url":"https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/","name":"Snyk: A forgotten contributor account compromised the entire Mastra npm package scope","type":"research","credibility":2}],"severity":"critical"},{"content":"Snyk, Orca Security and Microsoft Threat Intelligence have noted tradecraft overlaps with campaigns attributed to Sapphire Sleet (also known as BlueNoroff), a North Korean group known for targeting developer supply chains to steal cryptocurrency. The overlaps include clean-then-armed typosquat staging, a postinstall dropper that disables TLS, spawns a detached process and deletes itself, and a focus on wallet-extension harvesting. They closely mirror the April 2026 Axios npm compromise, which Microsoft formally attributed to Sapphire Sleet. Snyk stated, however: 'Attribution for this incident specifically is not confirmed, and we will not speculate further.' No government agency, law enforcement body or threat-intelligence firm has formally attributed this incident.\n\nPhoenix Security tracks the campaign as EASY_DAY_JS_MASTRA_2026. Both npm accounts used tutamail.com addresses, a privacy-focused email service common among financially motivated actors, which does not by itself establish attribution. The C2 servers were hosted on Hostwinds (ASN AS54290), a US-based provider. JFrog reported that an identical loader was seen on public sandboxes about 19 days before the attack (around May 29, 2026), indicating toolkit reuse and a longer campaign. Researchers describe the pre-staged clean version, the caret-range resolution trick and the persistent cross-platform RAT as signs of organised rather than opportunistic activity.","heading":"Attribution","sources":[{"url":"https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/","name":"Snyk: A forgotten contributor account compromised the entire Mastra npm package scope","type":"research","credibility":2},{"url":"https://orca.security/resources/blog/mastra-npm-supply-chain-attack/","name":"Orca Security: 144 Mastra npm Packages Compromised via Supply Chain Attack","type":"research","credibility":2},{"url":"https://www.microsoft.com/en-us/security/blog/2026/06/17/postinstall-payload-inside-mastra-npm-supply-chain-compromise/","name":"Microsoft Security Blog: From package to postinstall payload — Inside the Mastra npm supply chain compromise","type":"research","credibility":1},{"url":"https://thehackernews.com/2026/04/n-korean-hackers-spread-1700-malicious.html","name":"The Hacker News: N. Korean Hackers Spread 1,700 Malicious Packages Across npm, PyPI, Go, Rust","type":"news_article","credibility":2},{"url":"https://research.jfrog.com/post/easy-day-js/","name":"easy-day-js: Supply Chain Campaign Targets Mastra npm Packages — JFrog Security Research","type":"research","credibility":2},{"url":"https://phoenix.security/easy-day-js-mastra-npm-supply-chain-typosquat-rat-2026/","name":"Phoenix Security: easy-day-js / EASY_DAY_JS_MASTRA_2026","type":"research","credibility":2}],"severity":"high"},{"content":"Endor Labs detected the first malicious republish about 2 minutes and 18 seconds after it appeared on the registry. According to Mastra's GitHub issue #18061, the team became aware of the attack at about 8:45 PM PT on June 16, 2026 and contacted npm and its security partner Socket. By 11:57 PM PT, 110 compromised packages had been unpublished and 6 deprecated, since npm prevented those 6 from being fully unpublished. Safe versions were published around 1:00 AM PT on June 17 through pull request #18056, which forward-rolled 142 publishable packages and moved the 'latest' dist-tag past all compromised releases, restoring @mastra/core latest to 1.42.0. The same change removed the token-bypass setting that had let the attacker get around MFA. npm removed easy-day-js from the registry, malicious versions were flagged under advisory SNYK-JS-EASYDAYJS-17353313, and 'ehindero' was removed as a scope owner.\n\nMastra verified that source code in all repositories was clean, because the malicious dependency was injected at npm publish time rather than in git. It committed to reducing credential exposure, strengthening MFA enforcement, adopting federated identity and auditing access to revoke stale contributor permissions. JFrog reported that its automated systems flagged all compromised versions within 24 hours. StepSecurity, Endor Labs, Snyk, Kodem, OX Security, Orca Security, Phoenix Security, SafeDep, Cloudsmith, Socket, JFrog and Microsoft published technical analyses or incident-response runbooks.","heading":"Response and Remediation","sources":[{"url":"https://www.endorlabs.com/learn/mastra-npm-org-compromised-multiple-packages-trojanized-to-drop-a-remote-payload-via-easy-day-js","name":"Endor Labs: Mastra npm Org Compromised — Multiple Packages Trojanized","type":"research","credibility":2},{"url":"https://github.com/mastra-ai/mastra/issues/18061","name":"Mastra GitHub Issue #18061 — Official Incident Report","type":"official","credibility":1},{"url":"https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/","name":"Snyk: A forgotten contributor account compromised the entire Mastra npm package scope","type":"research","credibility":2},{"url":"https://research.jfrog.com/post/easy-day-js/","name":"easy-day-js: Supply Chain Campaign Targets Mastra npm Packages — JFrog Security Research","type":"research","credibility":2},{"url":"https://www.kodemsecurity.com/resources/mastra-npm-packages-compromised-easy-day-js-supply-chain-attack-iocs-and-response-runbook","name":"Kodem: Mastra npm Compromise — easy-day-js Attack & Response Runbook","type":"research","credibility":2},{"url":"https://www.stepsecurity.io/blog/mastra-npm-packages-compromised-using-easy-day-js","name":"StepSecurity: Mastra npm Supply Chain Attack — 140+ Packages Backdoored via easy-day-js","type":"research","credibility":2},{"url":"https://thehackernews.com/2026/06/144-mastra-npm-packages-compromised-via.html","name":"The Hacker News: 145 Mastra npm Packages Compromised via Hijacked Contributor Account","type":"news_article","credibility":2},{"url":"https://www.microsoft.com/en-us/security/blog/2026/06/17/postinstall-payload-inside-mastra-npm-supply-chain-compromise/","name":"Microsoft Security Blog: From package to postinstall payload — Inside the Mastra npm supply chain compromise","type":"research","credibility":1},{"url":"https://www.ox.security/blog/easy-day-js-supply-chain-attack-hits-mastra-ai-in-npm/","name":"OX Security: easy-day-js Supply Chain Attack Hits Mastra AI in npm","type":"research","credibility":2}],"severity":"high"},{"content":"- **Packages:** easy-day-js@1.11.22 (malicious, containing setup.cjs) and easy-day-js@1.11.21 (clean decoy); all @mastra/* versions published by ehindero on June 17, 2026 that include easy-day-js as a dependency (01:12-02:39 UTC; one source gives the window as starting 01:01 UTC, the publish time of easy-day-js@1.11.22). Advisory: SNYK-JS-EASYDAYJS-17353313.\n- **npm accounts:** sergey2016 (sergey2016@tutamail.com), the publisher of easy-day-js; ehindero (email changed to ehindero2016@tutamail.com), the compromised maintainer account.\n- **Network:** stage-1 C2 'https://23.254.164.92:8000/update/49890878' (Hostwinds, AS54290); stage-2 C2 23.254.164.123:443.\n- **Host files:** setup.cjs; .pkg_history (reported in the system temp directory by most sources, in the home directory by one); ~/.pkg_logs; protocal.cjs and a NodePackages directory dropped by the stage-2 implant.\n- **Persistence:** macOS ~/Library/LaunchAgents/com.nvm.protocal.plist; Linux ~/.config/systemd/user/nvmconf.service; Windows HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run value named NvmProtocal.","heading":"Indicators of Compromise","sources":[{"url":"https://www.stepsecurity.io/blog/mastra-npm-packages-compromised-using-easy-day-js","name":"StepSecurity: Mastra npm Supply Chain Attack — 140+ Packages Backdoored via easy-day-js","type":"research","credibility":2},{"url":"https://www.endorlabs.com/learn/mastra-npm-org-compromised-multiple-packages-trojanized-to-drop-a-remote-payload-via-easy-day-js","name":"Endor Labs: Mastra npm Org Compromised — Multiple Packages Trojanized","type":"research","credibility":2},{"url":"https://phoenix.security/easy-day-js-mastra-npm-supply-chain-typosquat-rat-2026/","name":"Phoenix Security: easy-day-js / EASY_DAY_JS_MASTRA_2026","type":"research","credibility":2},{"url":"https://socket.dev/blog/mastra-npm-packages-compromised","name":"140+ Mastra npm Packages Compromised in Coordinated Supply Chain Attack — Socket","type":"research","credibility":2},{"url":"https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/","name":"Snyk: A forgotten contributor account compromised the entire Mastra npm package scope","type":"research","credibility":2}],"severity":"critical"},{"content":"Researchers identified several weaknesses in the npm ecosystem that the attack exploited: scope publish permissions do not expire on dormant accounts; MFA token bypass allowed publishing without multi-factor authentication even where MFA was nominally required; postinstall hooks run arbitrary code at install time with no sandboxing, no opt-in from the consuming developer and no network egress restriction; and semantic versioning resolves to the newest matching version by default. OX Security noted that npm v12 (estimated July 2026) is expected to deprecate install scripts, and researchers suggested attackers may lean harder on postinstall hooks before then. StepSecurity showed that network egress monitoring (Harden Runner) blocked the C2 connections in testing.\n\nThe incident is one of a series of 2026 npm supply chain attacks on AI and developer tooling. Researchers noted similarities with an April 2026 campaign that distributed about 1,700 malicious packages across npm, PyPI, Go and Rust, which Microsoft attributed to North Korean-linked actors in the Sapphire Sleet cluster. The recurring pattern is to stage a clean package, arm it with a postinstall hook and push it widely through stale maintainer credentials, which yields valuable credentials given how many secrets developer environments hold.","heading":"Systemic Risk: npm Access Management and Install Scripts","sources":[{"url":"https://www.ox.security/blog/easy-day-js-supply-chain-attack-hits-mastra-ai-in-npm/","name":"OX Security: easy-day-js Supply Chain Attack Hits Mastra AI in npm","type":"research","credibility":2},{"url":"https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/","name":"Snyk: A forgotten contributor account compromised the entire Mastra npm package scope","type":"research","credibility":2},{"url":"https://www.stepsecurity.io/blog/mastra-npm-packages-compromised-using-easy-day-js","name":"StepSecurity: Mastra npm Supply Chain Attack — 140+ Packages Backdoored via easy-day-js","type":"research","credibility":2},{"url":"https://thehackernews.com/2026/04/n-korean-hackers-spread-1700-malicious.html","name":"The Hacker News: N. Korean Hackers Spread 1,700 Malicious Packages Across npm, PyPI, Go, Rust","type":"news_article","credibility":2},{"url":"https://safedep.io/mastra-npm-scope-takeover-supply-chain-attack/","name":"SafeDep: Mastra npm Scope Takeover — 141 Packages Drop a RAT","type":"research","credibility":2},{"url":"https://cloudsmith.com/blog/inside-the-mastra-npm-supply-chain-attack","name":"Cloudsmith: Inside the Mastra npm supply chain attack","type":"research","credibility":2}],"severity":"high"},{"content":"Researchers recommend the following for anyone who may have been exposed. **Immediate:** (1) audit npm install logs for any @mastra/* package installed after June 16, 2026, and treat any system that installed an affected version as potentially fully compromised; (2) move cryptocurrency holdings to fresh wallets with new seed phrases generated on a verified clean device; (3) rotate every credential that may have been in the environment, including npm and GitHub tokens, cloud provider keys (AWS, GCP, Azure), SSH keys, LLM API keys and CI/CD secrets; (4) review network egress logs for connections to 23.254.164.92 or 23.254.164.123; (5) remove persistence artefacts (com.nvm.protocal.plist, nvmconf.service, the NvmProtocal registry value, protocal.cjs and NodePackages); (6) consider reimaging affected developer machines and CI runners. **Preventive:** use committed lockfiles and npm ci in CI; disable install scripts by default (npm config set ignore-scripts true, or --ignore-scripts); monitor network egress in CI; require SLSA provenance on consumed packages; and regularly audit and revoke stale contributor scope permissions.","heading":"Developer Remediation Guidance","sources":[{"url":"https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/","name":"Snyk: A forgotten contributor account compromised the entire Mastra npm package scope","type":"research","credibility":2},{"url":"https://socket.dev/blog/mastra-npm-packages-compromised","name":"140+ Mastra npm Packages Compromised in Coordinated Supply Chain Attack — Socket","type":"research","credibility":2},{"url":"https://github.com/mastra-ai/mastra/issues/18061","name":"Mastra GitHub Issue #18061 — Official Incident Report","type":"official","credibility":1},{"url":"https://www.endorlabs.com/learn/mastra-npm-org-compromised-multiple-packages-trojanized-to-drop-a-remote-payload-via-easy-day-js","name":"Endor Labs: Mastra npm Org Compromised — Multiple Packages Trojanized","type":"research","credibility":2},{"url":"https://www.kodemsecurity.com/resources/mastra-npm-packages-compromised-easy-day-js-supply-chain-attack-iocs-and-response-runbook","name":"Kodem: Mastra npm Compromise — easy-day-js Attack & Response Runbook","type":"research","credibility":2},{"url":"https://www.stepsecurity.io/blog/mastra-npm-packages-compromised-using-easy-day-js","name":"StepSecurity: Mastra npm Supply Chain Attack — 140+ Packages Backdoored via easy-day-js","type":"research","credibility":2}],"severity":"high"}],"timeline":[{"date":"2024","event":"npm account 'ehindero' publishes legitimate alpha versions of @mastra/core (late 2024 to early 2025), acquiring scope-wide publish rights that are never revoked.","source":"Snyk","source_url":"https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/"},{"date":"2026-05","event":"An identical loader to the easy-day-js dropper is detected on public malware sandboxes around May 29, 2026, about 19 days before the attack.","source":"JFrog Security Research","source_url":"https://research.jfrog.com/post/easy-day-js/"},{"date":"2026-06","event":"npm account sergey2016 publishes easy-day-js@1.11.21, a clean copy of dayjs, on June 16, 2026 at 07:05 UTC.","source":"StepSecurity / JFrog","source_url":"https://www.stepsecurity.io/blog/mastra-npm-packages-compromised-using-easy-day-js"},{"date":"2026-06","event":"easy-day-js@1.11.22 is published at 01:01 UTC on June 17, 2026 with the obfuscated postinstall dropper (setup.cjs) and tagged 'latest'.","source":"StepSecurity / Endor Labs / Socket","source_url":"https://www.stepsecurity.io/blog/mastra-npm-packages-compromised-using-easy-day-js"},{"date":"2026-06","event":"Between 01:12 and 02:39 UTC on June 17, 2026, the hijacked ehindero account republishes 140+ (141-145 depending on source) @mastra packages with the easy-day-js dependency over about 88 minutes.","source":"StepSecurity / Snyk / Socket / Endor Labs","source_url":"https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/"},{"date":"2026-06","event":"Endor Labs detects the first malicious republish about 2 minutes and 18 seconds after it appears on the registry (June 17, 2026).","source":"Endor Labs","source_url":"https://www.endorlabs.com/learn/mastra-npm-org-compromised-multiple-packages-trojanized-to-drop-a-remote-payload-via-easy-day-js"},{"date":"2026-06","event":"Mastra becomes aware of the attack at about 8:45 PM PT on June 16 (June 17 UTC) and contacts npm and Socket; by 11:57 PM PT 110 packages are unpublished and 6 deprecated.","source":"Mastra GitHub Issue #18061","source_url":"https://github.com/mastra-ai/mastra/issues/18061"},{"date":"2026-06","event":"Safe versions are published around 1:00 AM PT on June 17 via PR #18056, forward-rolling 142 packages, restoring @mastra/core latest to 1.42.0 and removing the MFA token bypass; npm removes easy-day-js, flags versions under SNYK-JS-EASYDAYJS-17353313 and removes ehindero as scope owner.","source":"Snyk / Mastra GitHub Issue #18061 / The Hacker News","source_url":"https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/"},{"date":"2026-06","event":"Mastra's incident report states the compromised maintainer was an active employee phished through a fraudulent LinkedIn message; Snyk reports the ehindero account email had been changed to ehindero2016@tutamail.com.","source":"Mastra GitHub Issue #18061 / Snyk","source_url":"https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/"},{"date":"2026-06","event":"Microsoft's security blog publishes an analysis of the attack with threat-hunting guidance (June 17, 2026).","source":"Microsoft Security Blog","source_url":"https://www.microsoft.com/en-us/security/blog/2026/06/17/postinstall-payload-inside-mastra-npm-supply-chain-compromise/"},{"date":"2026-06","event":"Security firms including StepSecurity, Socket, OX Security, JFrog, Snyk, Orca Security, Phoenix Security, SafeDep, Cloudsmith and Kodem publish technical analyses and response runbooks (dated June 17 on one page and June 18 on the other); JFrog flags all compromised versions within 24 hours.","source":"OX Security / JFrog","source_url":"https://www.ox.security/blog/easy-day-js-supply-chain-attack-hits-mastra-ai-in-npm/"}],"sources_used":[{"url":"https://www.ox.security/blog/easy-day-js-supply-chain-attack-hits-mastra-ai-in-npm/","name":"OX Security: easy-day-js Supply Chain Attack Hits Mastra AI in npm","type":"research","archive_url":"https://web.archive.org/web/20260727104839/https://www.ox.security/research-news/easy-day-js-supply-chain-attack-hits-mastra-ai-in-npm/","credibility":2,"archive_timestamp":"2026-07-27T10:48:39+00:00"},{"url":"https://phoenix.security/easy-day-js-mastra-npm-supply-chain-typosquat-rat-2026/","name":"Phoenix Security: easy-day-js / EASY_DAY_JS_MASTRA_2026","type":"research","archive_url":"http://web.archive.org/web/20260621115319/https://phoenix.security/easy-day-js-mastra-npm-supply-chain-typosquat-rat-2026/","credibility":2,"archive_timestamp":"2026-06-21T11:53:19+00:00"},{"url":"https://www.stepsecurity.io/blog/mastra-npm-packages-compromised-using-easy-day-js","name":"StepSecurity: Mastra npm Supply Chain Attack — 140+ Packages Backdoored via easy-day-js","type":"research","archive_url":"http://web.archive.org/web/20260725015827/https://www.stepsecurity.io/blog/mastra-npm-packages-compromised-using-easy-day-js","credibility":2,"archive_timestamp":"2026-07-25T01:58:27+00:00"},{"url":"https://thehackernews.com/2026/06/144-mastra-npm-packages-compromised-via.html","name":"The Hacker News: 145 Mastra npm Packages Compromised via Hijacked Contributor Account","type":"news_article","archive_url":"http://web.archive.org/web/20260622125946/https://thehackernews.com/2026/06/144-mastra-npm-packages-compromised-via.html","credibility":2,"archive_timestamp":"2026-06-22T12:59:46+00:00"},{"url":"https://orca.security/resources/blog/mastra-npm-supply-chain-attack/","name":"Orca Security: 144 Mastra npm Packages Compromised via Supply Chain Attack","type":"research","archive_url":"http://web.archive.org/web/20261012131053/https://orca.security/resources/blog/mastra-npm-supply-chain-attack/","credibility":2,"archive_timestamp":"2026-10-12T13:10:53+00:00"},{"url":"https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/","name":"Snyk: A forgotten contributor account compromised the entire Mastra npm package scope","type":"research","archive_url":"http://web.archive.org/web/20260722234508/https://snyk.io/blog/a-forgotten-contributor-account-compromised-the-entire-mastra-npm-package-scope/","credibility":2,"archive_timestamp":"2026-07-22T23:45:08+00:00"},{"url":"https://www.endorlabs.com/learn/mastra-npm-org-compromised-multiple-packages-trojanized-to-drop-a-remote-payload-via-easy-day-js","name":"Endor Labs: Mastra npm Org Compromised — Multiple Packages Trojanized","type":"research","archive_url":"http://web.archive.org/web/20260718204449/https://www.endorlabs.com/learn/mastra-npm-org-compromised-multiple-packages-trojanized-to-drop-a-remote-payload-via-easy-day-js","credibility":2,"archive_timestamp":"2026-07-18T20:44:49+00:00"},{"url":"https://www.microsoft.com/en-us/security/blog/2026/06/17/postinstall-payload-inside-mastra-npm-supply-chain-compromise/","name":"Microsoft Security Blog: From package to postinstall payload — Inside the Mastra npm supply chain compromise","type":"research","archive_url":"http://web.archive.org/web/20260724215337/https://www.microsoft.com/en-us/security/blog/2026/06/17/postinstall-payload-inside-mastra-npm-supply-chain-compromise/","credibility":1,"archive_timestamp":"2026-07-24T21:53:37+00:00"},{"url":"https://safedep.io/mastra-npm-scope-takeover-supply-chain-attack/","name":"SafeDep: Mastra npm Scope Takeover — 141 Packages Drop a RAT","type":"research","archive_url":"http://web.archive.org/web/20260720141448/https://safedep.io/mastra-npm-scope-takeover-supply-chain-attack/","credibility":2,"archive_timestamp":"2026-07-20T14:14:48+00:00"},{"url":"https://cloudsmith.com/blog/inside-the-mastra-npm-supply-chain-attack","name":"Cloudsmith: Inside the Mastra npm supply chain attack","type":"research","archive_url":"http://web.archive.org/web/20260727092013/https://cloudsmith.com/blog/inside-the-mastra-npm-supply-chain-attack","credibility":2,"archive_timestamp":"2026-07-27T09:20:13+00:00"},{"url":"https://www.kodemsecurity.com/resources/mastra-npm-packages-compromised-easy-day-js-supply-chain-attack-iocs-and-response-runbook","name":"Kodem: Mastra npm Compromise — easy-day-js Attack & Response Runbook","type":"research","archive_url":"https://web.archive.org/web/20260727013220/https://www.kodemsecurity.com/resources/mastra-npm-packages-compromised-easy-day-js-supply-chain-attack-iocs-and-response-runbook","credibility":2,"archive_timestamp":"2026-07-27T01:32:20+00:00"},{"url":"https://thehackernews.com/2026/04/n-korean-hackers-spread-1700-malicious.html","name":"The Hacker News: N. Korean Hackers Spread 1,700 Malicious Packages Across npm, PyPI, Go, Rust","type":"news_article","archive_url":"http://web.archive.org/web/20260726044053/https://thehackernews.com/2026/04/n-korean-hackers-spread-1700-malicious.html","credibility":2,"archive_timestamp":"2026-07-26T04:40:53+00:00"},{"url":"https://socket.dev/blog/mastra-npm-packages-compromised","name":"140+ Mastra npm Packages Compromised in Coordinated Supply Chain Attack — Socket","type":"research","archive_url":"http://web.archive.org/web/20260618195835/https://socket.dev/blog/mastra-npm-packages-compromised","credibility":2,"archive_timestamp":"2026-06-18T19:58:35+00:00"},{"url":"https://github.com/mastra-ai/mastra/issues/18061","name":"Mastra GitHub Issue #18061 — Official Incident Report","type":"official","archive_url":"http://web.archive.org/web/20260722084821/https://github.com/mastra-ai/mastra/issues/18061","credibility":1,"archive_timestamp":"2026-07-22T08:48:21+00:00"},{"url":"https://research.jfrog.com/post/easy-day-js/","name":"easy-day-js: Supply Chain Campaign Targets Mastra npm Packages — JFrog Security Research","type":"research","archive_url":"http://web.archive.org/web/20260713064556/https://research.jfrog.com/post/easy-day-js/","credibility":2,"archive_timestamp":"2026-07-13T06:45:56+00:00"},{"url":"https://aiweekly.co/alerts/mastra-npm-supply-chain-attack-backdoors-144-packages","name":"Mastra npm Supply Chain Attack Backdoors 144 Packages — AI Weekly","type":"news_article","archive_url":"https://web.archive.org/web/20260726141110/https://aiweekly.co/alerts/mastra-npm-supply-chain-attack-backdoors-144-packages","credibility":2,"archive_timestamp":"2026-07-26T14:11:10+00:00"},{"url":"https://www.mend.io/blog/mastra-npm-scope-takeover-easy-day-js/","name":"Mastra npm Scope Takeover: 140+ Packages Compromised via easy-day-js Dropper — Mend.io","type":"research","archive_url":"http://web.archive.org/web/20260727090457/https://www.mend.io/blog/mastra-npm-scope-takeover-easy-day-js/","credibility":2,"archive_timestamp":"2026-07-27T09:04:57+00:00"}],"source_tags":[],"addresses":[],"reviewed":false,"reviewed_by":null,"model_used":"claude-code-merge-writer","created_at":"2026-06-19T12:20:56.054295+00:00","updated_at":"2026-11-01T22:40:25.345+00:00"},"source_quality":{"total":17,"tier1":0,"tier2":0,"tier3":0,"unrated":17},"follower_count":null,"content_updated_at":"2026-11-01T22:40:25.993Z","last_fact_checked_at":"2026-11-01T22:40:25.655Z","fact_check_next_allowed_at":"2026-11-08T22:40:25.655Z","update_next_allowed_at":null}