Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
Back to intelligence
package-repository-poisoningcredential-stealer-activityvendor-distribution-compromisepersistence-method

Malicious PyPI Packages Hit LiteLLM and PyTorch Lightning With Credential-Stealing Backdoors

Updated 1mo agoFirst seen May 4, 20267 sources

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.

Share:
Malicious PyPI Packages Hit LiteLLM and PyTorch Lightning With Credential-Stealing Backdoors
Stay ahead

Get ahead of threats like this

Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.

EVENT TIMELINE

How this story unfolded

7 events from the most recent confirmed update back to the earliest known activity.

7 EVENTS
May 21, 20261mo ago

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.

May 5, 20262mo ago

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.

May 4, 20262mo ago

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.

Apr 30, 20262mo ago

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.

Mar 24, 20263mo ago

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.

LINKED ENTITIES

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

14 LINKEDOpen in app
Malware
2 linked
Affected products
5 linked
Amazon Web ServicesBraveFirefoxPytorch LightningMicrosoft Defender
Organizations
7 linked
Lightning AIMozillaAmazon Web ServicesBrave SoftwareMicrosoft CorporationGitHubGoogle
The operational view lives in Mallory

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t — which of your assets are affected, which threat actors are using it right now, which detections to deploy, and what to do next.
Exposure mapping

Map indicators from this story to your assets and identify affected systems in minutes.

Threat actor evidence

Every observed campaign, victim, and pivot linked to actors named in this story.

Associated malware

Malware, exploits, and IOCs connected to the activity described here.

Detection signatures

YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.

Scheduled alerts

Get matching new stories delivered to your team as they break — not the next morning.

AI threads

Ask questions about this story and take action on the answers.