PyTorch Lightning Compromised in PyPI Supply Chain Attack
Threat actors have compromised the popular Python package Lightning, pushing two malicious versions, 2.6.2 and 2.6.3, to the PyPI repository on April 30, 2026. This marks another significant software supply chain attack aimed at credential theft. The Hacker News reports that Aikido Security, Socket, and StepSecurity identified these versions as malicious.
This campaign extends previous supply chain attacks, indicating a persistent and evolving threat landscape targeting development infrastructure. Attackers are clearly shifting focus upstream, aiming to infect widely used libraries to achieve broad impact with minimal effort. Compromising a package like Lightning, critical for machine learning and AI development, grants attackers access to a high-value target pool.
Defenders must recognize that the integrity of open-source repositories like PyPI is under constant assault. Relying solely on package managers for security is a critical misstep. Organizations need robust internal controls, including package integrity verification and strict dependency management, to mitigate the risk posed by compromised upstream components.
What This Means For You
- If your development teams use PyTorch Lightning, immediately check all environments for versions 2.6.2 and 2.6.3. If found, these must be quarantined and removed, and all credentials used in those environments rotated immediately. Assume compromise and follow incident response procedures for credential theft.
Related ATT&CK Techniques
๐ก๏ธ Detection Rules
3 rules ยท 6 SIEM formats3 detection rules auto-generated for this incident, mapped to MITRE ATT&CK. Sigma YAML is free โ export to any SIEM format via the Intel Bot.
Suspicious PyPI Package Installation - PyTorch Lightning Compromise
Indicators of Compromise
| ID | Type | Indicator |
|---|---|---|
| PyTorch-Lightning-Supply-Chain-Attack-2026 | Supply Chain Attack | PyTorch Lightning package |
| PyTorch-Lightning-Supply-Chain-Attack-2026 | Credential Theft | Malicious PyTorch Lightning version 2.6.2 |
| PyTorch-Lightning-Supply-Chain-Attack-2026 | Credential Theft | Malicious PyTorch Lightning version 2.6.3 |