Skip to main content

Inside the LiteLLM 1.107.0 supply chain compromise: Credential theft through Python startup hooks

0
High
Published: 10/23/2026 (10/23/2026, 18:12:19 UTC)
Source: Microsoft Security Blog

Description

The LiteLLM 1.107.0 Python package was compromised and published to PyPI, distributing malicious code that executed automatically during Python interpreter startup. The payload collected a wide range of credentials including developer, cloud, browser, SSH, and environment variables, then encrypted and exfiltrated this data to attacker-controlled endpoints. The compromise originated from stolen developer GitHub credentials used to alter the release workflow. The malicious code executed without requiring explicit import of LiteLLM, affecting any environment where Python was started with the compromised package installed. Recovery requires more than removing the package; affected Python environments, running processes, and exposed credentials must be addressed. Microsoft Defender provides detection and hunting guidance. No patch or fixed version is explicitly stated.

Affected software

Affected versions
=1.107.0

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/23/2026, 18:51:29 UTC

Technical Analysis

On October 21, 2026, a compromised LiteLLM 1.107.0 release was published to PyPI and distributed via official container images. The malicious package included Python startup files (cook.pth, cook.py, sitecustomize.py) that executed automatically during Python interpreter initialization, without needing the application to import LiteLLM. The payload launched a credential collector daemon targeting developer tools, AI applications, cloud credentials, browsers, SSH keys, environment variables, and LiteLLM proxy database data. Collected data was encrypted and exfiltrated to attacker-controlled endpoints. The compromise was enabled by stolen developer GitHub credentials that redirected the release workflow to a lookalike repository and bypassed production approval. The attack affected developer workstations, CI/CD agents, test systems, and containers. On Unix systems, the payload could retrieve and execute additional Python code. Microsoft advises against starting Python or pip in suspect environments to detect the compromise. Recovery requires addressing the Python environment, surviving processes, and exposed credentials. Microsoft Defender includes detection and hunting tools. No explicit patch or fixed version is provided.

Potential Impact

The compromise allows attackers to steal a broad range of sensitive credentials and configuration data from affected environments, including developer GitHub credentials, cloud API keys, browser data, SSH keys, environment variables, and LiteLLM proxy database records. This can lead to further unauthorized access and lateral movement within development, cloud, and infrastructure environments. The automatic execution of malicious code on Python startup means even indirect use of Python in affected environments can trigger credential theft, increasing exposure risk. The attack impacts multiple platforms including Windows and macOS, and affects developer workstations, CI/CD pipelines, containers, and test systems.

Mitigation Recommendations

No official patch or fixed version is stated. Removing the compromised LiteLLM 1.107.0 package or release tag alone is insufficient. Organizations must remediate by cleaning or rebuilding affected Python environments, terminating any surviving malicious processes, and rotating all potentially exposed credentials. Investigators should avoid starting Python or pip in suspect environments to prevent triggering the payload. Microsoft Defender detection and advanced hunting queries are available to identify and respond to the compromise. Follow vendor guidance for recovery and credential rotation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Classification
{"confidence":0.63,"severitySource":"default","classifier":"rss-v2"}
Article Source
{"url":"https://www.microsoft.com/en-us/security/blog/2026/10/23/inside-the-litellm-1-107-0-supply-chain-compromise-credential-theft-through-python-startup-hooks/","fetched":true,"fetchedAt":"2026-10-23T18:51:24.726Z","wordCount":3922}

Threat ID: 6adbacacd73cc49347b2ecb8

Added to database: 10/23/2026, 18:51:24 UTC

Last enriched: 10/23/2026, 18:51:29 UTC

Last updated: 10/23/2026, 19:51:25 UTC

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses