<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Pytorch-Lightning — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/pytorch-lightning/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Fri, 01 May 2026 00:45:31 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/pytorch-lightning/feed.xml" rel="self" type="application/rss+xml"/><item><title>Compromised PyTorch Lightning Packages on PyPI Steal Developer Credentials</title><link>https://feed.craftedsignal.io/briefs/2026-05-pytorch-lightning-compromise/</link><pubDate>Fri, 01 May 2026 00:45:31 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-pytorch-lightning-compromise/</guid><description>Compromised PyTorch Lightning packages versions 2.6.2 and 2.6.3 on PyPI contain malicious code to steal developer credentials from cloud and developer environments, and republish infected packages.</description><content:encoded><![CDATA[<p>On April 30, 2026, two malicious versions (2.6.2 and 2.6.3) of the widely used <code>pytorch-lightning</code> package were published to the PyPI registry after the publisher account was compromised. These versions contain embedded malicious code designed to steal developer credentials and republish infected versions of repositories to which the stolen tokens have access. The attack is triggered upon importing the package, initiating a background process that silently harvests credentials from a wide array of services, including AWS, Azure, Google Cloud, and GitHub, as well as local environment variables and credential files. Version 2.6.3 was published just 13 minutes after 2.6.2, and was intended to evade detection.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker compromises the publisher account for the <code>pytorch-lightning</code> package on PyPI.</li>
<li>Attacker publishes malicious versions 2.6.2 and 2.6.3 to PyPI.</li>
<li>A modified <code>__init__.py</code> file within the package initiates a background process upon import.</li>
<li>The background process executes silently, without any visible output or indication of compromise to the user.</li>
<li>The malicious package downloads a runtime (Bun) from GitHub.</li>
<li>The package executes a large, obfuscated JavaScript file, targeting AWS, Azure, Google Cloud, GitHub, and local credential stores.</li>
<li>Stolen credentials, including cloud provider keys, API tokens, and secrets, are exfiltrated to attacker-controlled infrastructure.</li>
<li>The malware attempts to download and execute a second-stage payload from attacker-controlled infrastructure, expanding the scope of the attack.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Organizations that downloaded and used versions 2.6.2 or 2.6.3 of the <code>pytorch-lightning</code> package are at high risk of compromise. The malicious package is designed to steal a wide range of credentials, including cloud provider keys, API tokens, and secrets stored in environment variables. This can lead to unauthorized access to sensitive data and systems, potentially resulting in data breaches, financial losses, and reputational damage. The malware&rsquo;s ability to download and execute secondary payloads further increases the potential impact.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Immediately remove versions 2.6.2 and 2.6.3 of the <code>lightning</code> package from all systems where they are installed (see overview).</li>
<li>Audit systems for unauthorized processes and review outbound network connections to detect potential compromises (see overview).</li>
<li>Rotate all cloud provider keys (AWS, Azure, GCP), API tokens (GitHub, CI/CD systems), and secrets stored in environment variables to prevent further unauthorized access (see Attack Chain).</li>
<li>Implement the <code>Detect Suspicious PyPI Package Installation</code> Sigma rule to identify potential malicious packages being installed in the future (see rules).</li>
<li>Implement the <code>Detect Credential Harvesting via Bun</code> Sigma rule to catch execution of the malicious JavaScript payload (see rules).</li>
<li>Pin dependencies to known-good versions and verify package integrity before use to prevent future supply chain attacks (see references).</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>supply-chain</category><category>pypi</category><category>credential-theft</category><category>malware</category></item></channel></rss>