PyTorch Lightning Compromised in Active Supply Chain Attack: GCC AI Development Teams Must Act Now
Versions 2.6.2 and 2.6.3 of PyTorch Lightning have been compromised with credential-stealing malware that runs automatically on import. The attack is linked to TeamPCP and LAPSUS$ and targets CI/CD pipelines and GitHub repositories.

Compromised software package spreading through a development pipeline network, representing the PyTorch Lightning supply chain attack targeting AI development environments
A live supply chain attack against PyTorch Lightning was confirmed on April 30, 2026, after threat actors published two malicious versions of the popular Python framework to the Python Package Index. Security research firms Aikido Security, Socket, OX Security, and StepSecurity independently identified the compromise. PyPI administrators have since quarantined the affected versions. Enterprise security teams and DevSecOps leads should treat this as requiring immediate action.
What Was Compromised and How
Versions 2.6.2 and 2.6.3 of PyTorch Lightning were published to PyPI on April 30, 2026 containing embedded malicious code. PyTorch Lightning is a widely used open-source Python framework providing a high-level interface for PyTorch, with over 31,100 stars on GitHub and broad adoption across machine learning and AI development workflows.
The attack is technically precise and requires no deliberate user action beyond standard package installation. According to Socket's analysis, the malicious package includes a hidden runtime directory containing a downloader and an obfuscated JavaScript payload. The execution chain activates automatically the moment the Lightning module is imported into a project, meaning any developer or pipeline that installed and used either affected version triggered the malware without any additional interaction.
The execution flow works as follows. A Python script downloads and executes the Bun JavaScript runtime, which then runs an 11MB obfuscated malicious payload. That payload conducts comprehensive credential harvesting across the affected environment.
What the Malware Does After Execution
The credential theft component is aggressive and multi-layered. Harvested GitHub tokens are validated against the GitHub API before being used to inject a worm-like payload into up to 50 branches from every repository the compromised token can write to. The injection operation overwrites existing files without any pre-check, meaning the poisoning is silent and leaves no obvious trace for the affected developer.
Every poisoned commit is authored using a hardcoded identity designed to impersonate a legitimate third-party tool, specifically constructed to avoid triggering immediate suspicion in repository commit histories.
The malware also implements a secondary npm-based propagation vector. It modifies the developer's local npm packages by inserting a postinstall hook, increments the patch version number, and repacks the tarballs. If the affected developer subsequently publishes those tampered packages from their local environment, the malware propagates downstream to npm and from there to any consumer of those packages. This creates a multi-hop propagation chain that extends well beyond the initial compromise.
Campaign Attribution and Scope
The attack is attributed to a threat actor tracked as TeamPCP, assessed to be an extension of the Mini Shai-Hulud supply chain campaign that targeted SAP-related npm packages earlier in the same week. The scope of prior TeamPCP activity is significant. Socket links shared technical indicators including payload implementation patterns, GitHub-based exfiltration methods, and credential harvesting approaches to prior attacks affecting Checkmarx, Bitwarden, Telnyx, LiteLLM, and Aqua Security Trivy.
In a separate but related development, version 7.0.4 of the intercom-client npm package was also confirmed compromised as part of the Mini Shai-Hulud campaign, using a preinstall hook to trigger the same credential-stealing mechanism. Enterprise environments using intercom-client in their development or production pipelines should treat it with the same urgency.
TeamPCP has since launched a dark web presence following the suspension of its public accounts and has publicly claimed LAPSUS$ as an associated partner throughout the operation.
Immediate Actions Required
The PyTorch Lightning maintainers have confirmed awareness and an active investigation is underway. The root cause has not yet been determined but indicators suggest the project's GitHub account was compromised as the initial access vector.
Enterprise security and DevSecOps teams should take the following steps immediately:
Block and remove PyTorch Lightning versions 2.6.2 and 2.6.3 from all developer systems, CI/CD pipelines, and build environments. Downgrade to version 2.6.1, the last confirmed clean release. Rotate all credentials, tokens, and API keys that were present in any environment where either affected version was installed and imported. Audit recent commits across all repositories accessible by tokens present in affected environments for unauthorised changes. Review local npm packages in affected developer environments for tampered postinstall hooks or unexpected version increments. Treat intercom-client 7.0.4 with the same level of urgency and apply equivalent remediation steps.
For enterprise teams operating CI/CD pipelines in GCC cloud and hybrid environments, the credential exposure risk extends beyond the immediate development environment to any downstream systems accessible via harvested tokens. The CISA secure software supply chain guidance provides a relevant reference framework for teams reviewing their dependency management and pipeline security controls.
The Broader Supply Chain Risk
This incident is not isolated. The Mini Shai-Hulud campaign represents a coordinated, multi-package supply chain operation targeting developer tooling across Python and npm ecosystems simultaneously. The technical sophistication of the propagation mechanism, particularly the npm self-replicating vector, is a material escalation from standard malicious package campaigns that rely solely on initial installation for impact.
For enterprise security teams managing large developer workforces, the risk surface here is not only the affected packages themselves but the downstream propagation potential if compromised developers publish tampered local packages before the infection is detected. Developer endpoint security, CI/CD pipeline isolation, and dependency pinning practices all bear directly on how far this type of campaign can travel through an organisation's software supply chain before containment.
Omar Al-Hakeem
Senior Cyber Threat Analyst | MENA RegionOmar Al-Hakeem is a cybersecurity researcher specializing in threat intelligence, ransomware trends, and nation-state activity across the Middle East and North Africa. With over 12 years of experience in SOC operations and incident response, he provides deep technical breakdowns of emerging attacks and regional cyber risks. At MENA Cyber Wire, Omar focuses on real-world threat analysis and actionable defense strategies for enterprises and startups.