
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.
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.Workerprocess via/proc/{pid}/cmdline, then reads/proc/{pid}/memdirectly to recover secrets masked in workflow logs. - Two capabilities not in the summary — Workflow injection: modifies Actions workflow files to request
id-token: writeand reference attacker-controlled pinned action SHAs. Privilege escalation: on GitHub-hosted runners writesrunner ALL=(ALL) NOPASSWD:ALLfor 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.gypfile but has no C++ sources and no.nodebinary output. The Phantom Gyp technique hides execution in node-gyp's<!(...)>shell expansion inside thesourcesarray, so nothing appears in thescriptsblock ofpackage.json. - Runtime detection signal: the anomalous process chain is
node-gypspawningcurl,unzip, andbun, plus an unauthorized/proc/*/memread. Harden-Runner terminates the run on this pattern. - Rotate any secrets exposed to affected CI runs; audit workflow files for injected
id-token: writeand 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
Related in Supply Chain


