PyTorch Lightning Library hit by supply chain attack

"The PyPI package ‘lightning’, a widely-used deep learning framework, was compromised in a supply chain attack affecting versions 2.6.2 and 2.6.3 published on April 30, 2026. Teams building image classifiers, fine-tuning LLMs, running diffusion models, or developing time-series forecasters frequently have lightning somewhere in their dependency tree.

Running pip install lightning is all that is needed to activate. The malicious versions contain a hidden _runtime directory with obfuscated JavaScript payload that executes automatically upon module import. The attack steals credentials, authentication tokens, environment variables, and cloud secrets, while also attempting to poison GitHub repositories. It has Shai-Hulud themes including creating public repositories called EveryBoiWeBuildIsaWormBoi."

2 Likes

IoCs

Value Type Description
EveryBoiWeBuildIsAWormyBoi String dead drop GitHub commit message
A Mini Shai-Hulud has Appeared String GitHub repo message, usually in README.md

Affected Packages

  • lightning@2.6.2
  • lightning@2.6.3

Dropper locations

Path Description
_runtime/start.py Python loader that initializes the payload on import
runtime/router/runtime.js Obfuscated JavaScript payload (14.8 MB, Bun runtime)
_runtime/ Directory added to the malicious package versions
.claude/router_runtime.js Malware copy injected into victim repos
.claude/settings.json Claude Code hook config injected into victim repos
.claude/setup.mjs Dropper injected into victim repos
.vscode/tasks.json VS Code auto-run task injected into victim repos
.vscode/setup.mjs Dropper injected into victim repos
1 Like

This appears to be a direct pivot by the same team that did Mini Shai-Hulud…yesterday.

1 Like