PyPI Package Compromised in Supply Chain Attack
The popular PyPI package lightning experienced a supply chain attack affecting versions 2.6.2 and 2.6.3, published on April 30, 2026. The compromise introduced malicious code that executes automatically upon module import, downloading Bun JavaScript runtime and executing an 11MB obfuscated payload. The attack harvests credentials including GitHub tokens, npm tokens, cloud credentials from AWS, Azure, and Google Cloud, while targeting CI/CD environments. The malicious code poisons GitHub repositories by injecting backdoored files impersonating Claude Code commits and infects local npm packages through tarball manipulation. The attack shows similarities to previous Shai-Hulud campaigns in terms of credential targeting and obfuscation methods. Evidence suggests the maintainer's GitHub account (pl-ghost) was compromised, with suspicious branch operations and disclosure suppression indicating ongoing attacker control. The incident affects a widely-used deep learning framework receiving millions of monthly downl...
AI Analysis
Technical Summary
A supply chain attack targeted the popular PyPI package 'lightning' in versions 2.6.2 and 2.6.3, introducing malicious code that runs on import. This code downloads the Bun JavaScript runtime and executes an 11MB obfuscated payload designed to steal credentials such as GitHub tokens, npm tokens, and cloud credentials from AWS, Azure, and Google Cloud. The attack also manipulates CI/CD environments by injecting backdoored files into GitHub repositories and infecting local npm packages via tarball manipulation. The attacker likely compromised the maintainer's GitHub account, enabling suspicious branch operations and suppression of disclosure. The attack shares characteristics with previous Shai-Hulud campaigns. No patch or official fix has been documented in the provided data.
Potential Impact
The compromise allows attackers to harvest sensitive credentials across multiple platforms including GitHub, npm, and major cloud providers, potentially enabling further unauthorized access and persistence in victim environments. The infection of CI/CD pipelines and repository poisoning increases the risk of widespread downstream compromise. The attack affects a widely used deep learning framework, potentially impacting many users and organizations relying on it. There are no known exploits in the wild reported yet.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid using versions 2.6.2 and 2.6.3 of the 'lightning' package. Review and rotate any potentially exposed credentials, including GitHub, npm, and cloud service tokens. Inspect CI/CD environments and repositories for unauthorized changes or injected backdoors. Monitor for suspicious activity related to the maintainer's GitHub account and consider using alternative package versions or sources until the issue is resolved.
Indicators of Compromise
- hash: 40d0f21b64ec8fb3a7a1959897252e09
- hash: f1b3e7b3eec3294c4d6b5f87854a52471f03997f
- hash: 5f5852b5f604369945118937b058e49064612ac69826e0adadca39a357dfb5b1
PyPI Package Compromised in Supply Chain Attack
Description
The popular PyPI package lightning experienced a supply chain attack affecting versions 2.6.2 and 2.6.3, published on April 30, 2026. The compromise introduced malicious code that executes automatically upon module import, downloading Bun JavaScript runtime and executing an 11MB obfuscated payload. The attack harvests credentials including GitHub tokens, npm tokens, cloud credentials from AWS, Azure, and Google Cloud, while targeting CI/CD environments. The malicious code poisons GitHub repositories by injecting backdoored files impersonating Claude Code commits and infects local npm packages through tarball manipulation. The attack shows similarities to previous Shai-Hulud campaigns in terms of credential targeting and obfuscation methods. Evidence suggests the maintainer's GitHub account (pl-ghost) was compromised, with suspicious branch operations and disclosure suppression indicating ongoing attacker control. The incident affects a widely-used deep learning framework receiving millions of monthly downl...
Affected software
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
A supply chain attack targeted the popular PyPI package 'lightning' in versions 2.6.2 and 2.6.3, introducing malicious code that runs on import. This code downloads the Bun JavaScript runtime and executes an 11MB obfuscated payload designed to steal credentials such as GitHub tokens, npm tokens, and cloud credentials from AWS, Azure, and Google Cloud. The attack also manipulates CI/CD environments by injecting backdoored files into GitHub repositories and infecting local npm packages via tarball manipulation. The attacker likely compromised the maintainer's GitHub account, enabling suspicious branch operations and suppression of disclosure. The attack shares characteristics with previous Shai-Hulud campaigns. No patch or official fix has been documented in the provided data.
Potential Impact
The compromise allows attackers to harvest sensitive credentials across multiple platforms including GitHub, npm, and major cloud providers, potentially enabling further unauthorized access and persistence in victim environments. The infection of CI/CD pipelines and repository poisoning increases the risk of widespread downstream compromise. The attack affects a widely used deep learning framework, potentially impacting many users and organizations relying on it. There are no known exploits in the wild reported yet.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid using versions 2.6.2 and 2.6.3 of the 'lightning' package. Review and rotate any potentially exposed credentials, including GitHub, npm, and cloud service tokens. Inspect CI/CD environments and repositories for unauthorized changes or injected backdoors. Monitor for suspicious activity related to the maintainer's GitHub account and consider using alternative package versions or sources until the issue is resolved.
Technical Details
- Author
- AlienVault
- Tlp
- white
- References
- ["https://socket.dev/blog/lightning-pypi-package-compromised"]
- Adversary
- Team PCP
- Pulse Id
- 69f3a961ffb07e2895566458
- Threat Score
- null
Indicators of Compromise
Hash
| Value | Description | Copy |
|---|---|---|
hash40d0f21b64ec8fb3a7a1959897252e09 | — | |
hashf1b3e7b3eec3294c4d6b5f87854a52471f03997f | — | |
hash5f5852b5f604369945118937b058e49064612ac69826e0adadca39a357dfb5b1 | — |
Threat ID: 69f8a7e0cbff5d861027fc2b
Added to database: 5/4/2026, 2:06:24 PM
Last enriched: 5/4/2026, 2:21:23 PM
Last updated: 6/18/2026, 12:00:14 PM
Views: 369
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.