pypi · Malicious package advisory
Malwarelightning
GHSA-g4wr-mm54-799x
Malicious code in lightning (PyPI)
Details
**Severity:** Critical **Affected versions:** `= 2.6.2` ## Source: kam193 (703ac419d775488be137d7e01517d768da0b5581ab63338fb9523f2289f2b92c) Versions 2.6.2, 2.6.3 were compromised. Compromised versions contain injected code that starts automatically during importing the module, downloads (legitimate) JavaScript runtime, and executes included JavaScript infostealer. It collects credentials from multiple sources (e.g. files, process memory, cloud metadata endpoints, CLI commands like gh or gcloud), sensitive cryptocurrency data, shell history files. It also attempts to spread itself using discovered credentials to other repositories and packages. --- Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers. Campaign: 2026-04-compr-lightning Reasons (based on the campaign): - infostealer - files-exfiltration - exfiltration-ssh-keys - exfiltration-crypto - exfiltration-credentials - compromised-package --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/49d0cfba3689ed9b195d101d3a2a964c6a77f767/osv/malicious/pypi/lightning/MAL-2026-3201.json)) **References:** - https://github.com/Lightning-AI/pytorch-lightning/security/advisories/GHSA-w37p-236h-pfx3 - https://github.com/Lightning-AI/pytorch-lightning/issues/21691 - https://bad-packages.kam193.eu/pypi/campaign/2026-04-compr-lightning - https://github.com/ossf/malicious-packages/blob/49d0cfba3689ed9b195d101d3a2a964c6a77f767/osv/malicious/pypi/lightning/MAL-2026-3201.json - https://socket.dev/blog/lightning-pypi-package-compromised - https://www.aikido.dev/blog/pytorch-lightning-pypi-compromise-mini-shai-hulud - https://github.com/advisories/GHSA-g4wr-mm54-799x
Compromised versions (1)
- = 2.6.2
Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.