Malicious PyTorch Lightning 2.6.3 Package Delivered Credential-Stealing Payload

· Original article ↗

Summary

PyTorch Lightning 2.6.3 on PyPI ran a credential-stealing payload on import. Microsoft Defender detected and blocked activity affecting a small number of devices; the package was reverted to 2.6.1, and users are advised to rotate secrets.

Key points

  • The compromised lightning==2.6.3 package triggered a hidden execution chain when imported.
  • A background process downloaded Bun v1.3.13 and ran an 11.4 MB obfuscated JavaScript payload named router_runtime.js.
  • Microsoft Defender identifies the payload as ShaiWorm and says it detected and prevented the activity.
  • The payload targeted environment files, API keys, GitHub tokens, browser data, and cloud credentials; it also supported arbitrary system commands.
  • Microsoft telemetry indicated activity on a small number of devices, contained to a narrow set of environments.
  • Lightning AI reverted the package to version 2.6.1 and is investigating the release-pipeline compromise and auditing recent releases.
  • Users who imported version 2.6.3 are advised to rotate all secrets.

Article Details

Event Type
Software supply-chain compromise involving a malicious PyTorch Lightning package published on PyPI.
Impact
The lightning==2.6.3 release executed a credential-stealing JavaScript payload on import. It targeted .env files, API keys, secrets, GitHub tokens, browser data, and cloud credentials, and supported arbitrary system command execution. Microsoft reported that Defender detected and blocked the activity, which affected a small number of devices. Lightning AI reverted the package to version 2.6.1; users who imported the compromised release were advised to rotate their secrets.

MITRE ATT&CK

Malware

Vendors

Products

Related Articles