Skip to content

Back to the catalog

Mass npm Supply Chain Attack: 20 Leo Platform Packages Compromised
stepsecurity.iowriteup

Mass npm Supply Chain Attack: 20 Leo Platform Packages Compromised

StepSecurity documents a June 24, 2026 attack that published malicious versions of 20 Leo Platform npm packages (including leo-logger and leo-sdk) within a 3-second window, using the same "Phantom Gyp" binding.gyp install-hook technique, three-layer obfuscation chain, and Bun runtime evasion seen in the earlier Miasma campaign (57 packages, June 3, 2026). The payload steals GitHub Actions runner memory, cloud/registry/password-manager credentials, exfiltrates via GitHub dead-drop commits using the victim's own token, self-propagates by publishing to any package the victim can access via the npm bypass_2fa mechanism, and escalates privileges via passwordless sudo on runners. The post includes IOCs and maps defenses (Harden-Runner, Secure Registry cooldowns, PR-based compromised-package checks) to each stage of the attack.

TL;DR A coordinated 3-second npm publish burst compromised 20 Leo Platform packages with the same Phantom Gyp/Miasma toolkit that steals CI/CD secrets and worms via bypassed 2FA npm publishing.
Document

What it is

StepSecurity's analysis of a targeted npm supply-chain attack on the Leo Platform ecosystem. On 2026-06-24 an attacker used stolen maintainer credentials to publish malicious versions of 20 packages (~13,600 downloads/week combined) in a burst under 3 seconds, timestamped 2026-06-24T23:04:55Z. StepSecurity analyzed leo-logger@1.0.8 in full and spot-checked leo-sdk@6.0.19. It is attributed to the same actor behind the Miasma campaign (57 packages, published 2026-06-03) — 21 days earlier, quieter and more targeted, but structurally identical.

How it works

The summary covers the delivery chain; the page adds the identifying fingerprints and additional capabilities:

  • Obfuscation chain is specifically ROT-N cipher → AES-128-GCM → obfuscator.io, and the payload downloads Bun v1.3.13 from a fixed URL. The identical binding.gyp hook syntax, Bun URL, and obfuscation structure are what tie both campaigns to one actor.
  • Runner memory theft: locates the GitHub Actions Runner.Worker process via /proc/{pid}/cmdline, then reads /proc/{pid}/mem directly to recover secrets masked in workflow logs.
  • Two capabilities not in the summary — Workflow injection: modifies Actions workflow files to request id-token: write and reference attacker-controlled pinned action SHAs. Privilege escalation: on GitHub-hosted runners writes runner ALL=(ALL) NOPASSWD:ALL for passwordless sudo.
  • Credential sweep targets are broad: AWS (IMDS, Secrets Manager, SSM, ECS), GCP, Azure (Key Vault, federated creds), HashiCorp Vault (10+ token locations), Kubernetes, npm, PyPI, RubyGems, JFrog, GitHub PATs, and 1Password.

Preconditions / Affected

Any of the 20 listed Leo Platform packages at the compromised versions, installed in an environment where npm install runs the install hook — CI/CD runners are the primary target. Exfiltration uses the victim's own GitHub token via the GraphQL API to commit to a dead-drop repo, so no attacker-controlled domain is ever contacted — egress filtering will not catch it.

What to do

  • Detection heuristic the page states plainly: treat as suspicious any package that ships a binding.gyp file but has no C++ sources and no .node binary output. The Phantom Gyp technique hides execution in node-gyp's <!(...)> shell expansion inside the sources array, so nothing appears in the scripts block of package.json.
  • Runtime detection signal: the anomalous process chain is node-gyp spawning curl, unzip, and bun, plus an unauthorized /proc/*/mem read. Harden-Runner terminates the run on this pattern.
  • Rotate any secrets exposed to affected CI runs; audit workflow files for injected id-token: write and unexpected pinned action SHAs; check for the sudoers modification on self-hosted runners.
  • A registry cooldown on newly published versions blocks the ingestion window.

Caveats

Only leo-logger@1.0.8 was analyzed in full; the rest of the 20 were confirmed by spot-check and shared toolkit fingerprints. The full IOC list and the complete package-and-version table live in the linked Miasma post and StepSecurity Threat Center, not in this page's excerpt.

Organisations named here

  • bypass_2fa
  • Leo Platform

Technologies named here

  • leo-logger
  • Harden-Runner
  • StepSecurity Secure Registry
  • leo-sdk
  • StepSecurity Dev Machine Guard
  • Leo Platform npm packages
  • npm Package Cooldown Check
  • @vapi-ai/server-sdk
  • ai-sdk-ollama
  • NPM Package Compromised Updates Check
  • jagreehal package family
  • npm Package Search
  • StepSecurity Threat Center
  • npm
  • GitHub Actions
  • node-gyp
  • Bun
  • GitHub
  • StepSecurity

Techniques named here

  • Phantom Gyp
  • Three-layer obfuscation chain
  • Bun runtime evasion
  • Runner process memory extraction
  • Multi-cloud credential sweep
  • GitHub dead-drop exfiltration
  • Supply chain worm propagation
  • Workflow injection
  • Privilege escalation via sudoers modification

Threat actors named here

  • Leo Platform attacker
  • Miasma Campaign
  • Miasma