npm

The Mastra npm Supply Chain Attack

Updated 5 Oct 2026 · Incident date 17 Jun 2026

Attackers used a hijacked maintainer account to publish poisoned versions of more than 140 Mastra npm packages, including @mastra/core 1.42.1, on 17 June 2026.

Each poisoned release gained one new dependency named easy-day-js, a look-alike of the dayjs date library. Microsoft links the attack to the North Korean group Sapphire Sleet.

What happened

The attacker published a fake dependency, then used a maintainer's npm account to add it to 140 or more @mastra packages.

  • The account sergey2016 published easy-day-js 1.11.21, a clean bait release. Version 1.11.22 with a malicious install hook followed on 17 June 2026 at 01:01 UTC.
  • The hijacked account ehindero published the poisoned packages from about 01:20 UTC. Each lists easy-day-js with the range ^1.11.21, which resolves to 1.11.22.
  • The hook runs node setup.cjs --no-warnings. The dropper downloads an implant from 23.254.164.92 and runs it as a hidden Node.js process.
  • The implant collects host data and browser history. It checks for 166 crypto wallet extension IDs.
  • It adds login persistence on Windows, macOS and Linux. On Windows, a later backdoor installs a service named scdev that runs as SYSTEM.

The Hacker News reports that the publishing took 88 minutes. It names a LinkedIn attack on a maintainer as the root cause. Source counts run from 80 to 145 packages.

Affected versions

  • mastra 1.13.1. Version 1.13.0 and earlier are not affected.
  • @mastra/core 1.42.1. Version 1.42.0 and earlier are not affected.
  • create-mastra 1.13.1
  • easy-day-js 1.11.22, the malicious dependency. Version 1.11.21 is the clean bait release.
  • Any @mastra package that lists easy-day-js in its dependencies is poisoned. The full list of 140 or more packages is in the Microsoft and Hacker News reports.

Indicators of compromise

  • Dependency name: easy-day-js (version 1.11.22, range ^1.11.21).
  • npm accounts: ehindero (hijacked maintainer), sergey2016 (easy-day-js publisher)
  • Install command: node setup.cjs --no-warnings.
  • Dropper SHA-256 (setup.cjs): B122A9873BEDF145AE2A7FD024B5F309007DBB025149F4DC4AC3F7E4F32A36A4.
  • easy-day-js-1.11.22.tgz SHA-256: AE70DD4F6BC0D1C8C2848E4E6B51934626C4818DCB5AF99D080DDBD7DC337185.
  • mastra-1.13.1.tgz SHA-256: B73DE25C053C3225A077738A1FCBD9CA6966D7B3CD6F5494A30F0AA0EAE55C7E.
  • C2 IP addresses: 23.254.164.92 and 23.254.164.123.
  • Payload URL: https://23.254.164.92:8000/update/49890878.
  • Domains: teams.onweblive.org and maskasd.com.
  • Marker files: $TMPDIR/.pkg_history and $TMPDIR/.pkg_logs.
  • Persistence: Windows Run key value NvmProtocal, macOS com.nvm.protocal.plist in ~/Library/NodePackages/, Linux nvmconf.service in ~/.config/systemd/nvmconf/.
  • Implant file name: protocal.cjs (spelled this way).
  • Windows service: scdev with DLL path C:\windows\system32\scdev.dll.

How to check

Search for easy-day-js. Any hit means a poisoned package resolved on that machine.

npm ls easy-day-js

Check for the marker files from the dropper.

ls -la "${TMPDIR:-/tmp}"/.pkg_history "${TMPDIR:-/tmp}"/.pkg_logs

What to do now

  1. Pin mastra to 1.13.0 or earlier and @mastra/core to 1.42.0 or earlier. Remove node_modules and reinstall with npm install --ignore-scripts.
  2. Treat any workstation, CI runner or build agent that resolved easy-day-js as compromised. Rotate its credentials, tokens and API keys, and move crypto assets from its wallets.
  3. Block 23.254.164.92, 23.254.164.123, teams.onweblive.org and maskasd.com at the network edge.
  4. On Windows, check for the scdev service and the Defender exclusion for C:\Windows\System32. Rebuild the machine if you find them.

What Vigilance would show

These examples show an install hold and the corresponding owner report.

Example install message

Vigilance blocked `@mastra/`. This version is too new or changed in a way Vigilance must check first.

Example owner report

Bad update

@mastra/

An AI toolkit gained a new hidden helper that installs remote-control software and hunts for cryptocurrency wallets.

See what to do now.

No security team? See who reads the alert.

Frequently asked questions

Who is behind the Mastra npm attack?

Microsoft attributes it to Sapphire Sleet, also tracked as BlueNoroff, with high confidence. The group targets crypto wallets.

How popular is @mastra/core?

BleepingComputer reports about 918,000 weekly downloads at the time.

Is this linked to the Axios attack?

BleepingComputer reports that the same group is linked to the April 2026 Axios compromise.

Sources

  1. microsoft.com/en-us/security/blog/2026/06/17/postinstall-payload-inside-mastra-npm-supply-chain-compromise/
  2. thehackernews.com/2026/06/144-mastra-npm-packages-compromised-via.html
  3. bleepingcomputer.com/news/security/microsoft-links-mastra-ai-supply-chain-attack-to-north-korean-hackers/

Send this page to the person who looks after AI at your company.

Email it

More supply chain attacks

All 172 attacks in the library · npm supply chain attacks · How to prevent supply chain attacks

Check the next update before you install it

Vigilance compares the version you trust with the new one. It names the one file that gained a power the old version did not have.

Start the free 14-day trialBrowse the attack library