
import lightning
That line executed on developer machines worldwide last week. For 42 minutes on April 30, 2026, it also triggered a supply chain worm.
Versions 2.6.2 and 2.6.3 of the official PyPI package - PyTorch Lightning by Lightning AI - were published maliciously after the publisher's credentials were stolen. No typosquatting involved; just account compromise.
The trigger hid in a modified __init__.py file. On import, it spawned a background thread with no user interaction required.
That thread ran _runtime/start.py (SHA256 8046a11187c135da6959862ff3846e99ad15462d2ec8a2f77a30ad53ebd5dcf2). The script checked for Bun JavaScript runtime v1.3.13, downloading it from GitHub if missing, then executed _runtime/router_runtime.js - a 14.8MB hex-obfuscated payload.
The JS targeted cloud credentials across AWS (IMDSv2, STS, Secrets Manager), Azure (AD, Key Vault, Service Fabric), and GCP (OAuth2, metadata, KMS). It also hit browsers like Chrome, Firefox, and Brave, plus .env files, API keys, and GitHub tokens.
Exfiltration went via HTTPS POST to an attacker C2 server. It used GitHub as a dead drop, committing logs prefixed "EveryBoiWeBuildIsAWormyBoi", and pushed changes directly to victim repositories.
For persistence, the payload wrote to the developer's editor. In VS Code, it added a .vscode/tasks.json with "runOn: folderOpen" that fired node setup.mjs to re-pull the payload from /tmp. A Claude Code .claude/settings.json got a "SessionStart" hook doing the same. If a write token was grabbed, it dropped a malicious GitHub Actions workflow named "Formatter" to dump repo secrets.
Lightning AI quarantined the packages and reverted to 2.6.1 from 12:45:20 to 13:27:30 UTC. PyPI logs ~11M monthly downloads for lightning.
Microsoft Defender flags it as "ShaiWorm", linked to the Mini Shai-Hulud campaign with its Dune sandworm theme. No CVE assigned as of May 5, 2026.
A trusted import became the vector for cloud and code compromise.
English