Malicious PyPI Packages Hit LiteLLM and PyTorch Lightning With Credential-Stealing Backdoors
Two widely used Python packages, LiteLLM and PyTorch Lightning, were distributed on PyPI with malicious code that executed during installation or import and attempted to steal credentials and establish persistence. In the LiteLLM incident, versions 1.82.7 and 1.82.8 were flagged as compromised, with maintainers and downstream projects warning that a litellm_init.pth file contained data-exfiltration malware that sent information to models.litellm.cloud. Public advisories and community tooling were released to help users determine whether their machines had been affected, while third-party analysis described the package as combining credential theft with a persistent backdoor.
In the PyTorch Lightning incident, version 2.6.3 on PyPI was found to trigger a hidden execution chain as soon as the package was imported, launching a background process that downloaded the Bun runtime from GitHub and ran an obfuscated JavaScript payload named router_runtime.js. Microsoft Threat Intelligence said Defender detected and blocked the activity, tracked as ShaiWorm, and reported that only a small number of devices in a narrow set of environments were affected. The malware targeted browser data, .env files, API keys, GitHub tokens, and cloud credentials across AWS, Azure, and GCP, and also supported arbitrary command execution; Lightning AI reverted the package to 2.6.1, urged anyone who imported 2.6.3 to rotate all secrets immediately, and said it is investigating a possible compromise of its build or release pipeline.

Get ahead of threats like this
Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
How this story unfolded
7 events from the most recent confirmed update back to the earliest known activity.
SafeDep publishes technical analysis of malicious LiteLLM 1.82.8
SafeDep released a detailed analysis describing LiteLLM 1.82.8 as a credential-stealing persistent backdoor, adding technical detail to the earlier disclosure of the PyPI supply-chain attack.
Lightning AI warned of possible supply-chain attack in version 2.6.3
A public GitHub issue disclosed that PyTorch Lightning 2.6.3 on PyPI appeared backdoored, recommending that the release be yanked and that the build or release pipeline be investigated for compromise.
Lightning AI reverts PyTorch Lightning package and urges secret rotation
After the malicious 2.6.3 release was identified, Lightning AI reverted the PyPI package to version 2.6.1, advised anyone who imported 2.6.3 to rotate all secrets immediately, and began investigating a possible build or release pipeline compromise.
Microsoft detects and blocks ShaiWorm activity from malicious Lightning package
Microsoft Threat Intelligence said Defender detected and blocked the malicious activity associated with the backdoored PyTorch Lightning package, which it tracks as ShaiWorm, and reported only a small number of affected devices in a narrow set of environments.
PyTorch Lightning 2.6.3 malicious behavior verified
A reporter stated that the PyPI wheel for lightning version 2.6.3 was verified on April 30, 2026 to contain a hidden execution chain that downloaded Bun and ran an obfuscated JavaScript payload with credential-theft and exfiltration capabilities.
Detector released for LiteLLM compromise
A GitHub tool was published to help users determine whether their machines were compromised by the malicious LiteLLM 1.82.7/1.82.8 packages.
Malicious LiteLLM packages 1.82.7/1.82.8 disclosed on PyPI
Multiple project and GitHub references published on March 24, 2026 reported that LiteLLM versions 1.82.7 and 1.82.8 on PyPI were compromised in a supply-chain attack and contained data-exfiltration malware.
Related entities
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
Sources
7 references tracked. Mallory keeps watching after this page renders.
Malicious litellm 1.82.8: Credential Theft and Persistent Backdoor - Real-time Open Source Software Supply Chain Security
safedep.io
Open sourcePossible supply chain attack on version 2.6.3 · Issue #21689 · Lightning-AI/pytorch-lightning
github.com
Open sourceBackdoored PyTorch Lightning package drops credential stealer
bleepingcomputer.com
Open source[Notice] LiteLLM Supply Chain Attack · Issue #9500 · stanfordnlp/dspy
github.com
Open sourceSecurity: litellm_init.pth contains data-exfiltration malware (exfiltrates to models.litellm.cloud) · Issue #24515 · BerriAI/litellm
github.com
Open sourceGitHub - jthack/litellm-vuln-detector: Detect if your machine was compromised by the litellm 1.82.7/1.82.8 PyPI supply chain attack (March 24, 2026) · GitHub
github.com
Open sourceLiteLLM on PyPI is compromised [LWN.net]
lwn.net
Open sourceSee the full picture, correlated to your attack surface.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.


