Security

LiteLLM 1.107.0 Breach: Python Hook Credential Theft

3 min read

Summary

Microsoft has detailed a supply chain compromise in LiteLLM 1.107.0 that used Python startup hooks to launch credential theft automatically. The issue is especially serious because simply starting Python in an affected environment could trigger the payload, putting developer workstations, CI/CD agents, containers, and LiteLLM proxy deployments at risk.

Need help with Security?Talk to an Expert

Introduction

Microsoft has published new analysis of the compromised LiteLLM 1.107.0 release, and the findings highlight why software supply chain attacks remain a major risk for developers and IT teams. In this case, the malicious package abused Python startup behavior so that credential theft could begin even if an application never imported LiteLLM directly.

That makes this incident more than a typical package compromise. Any affected Python environment on developer devices, build systems, test hosts, or containers may have executed the payload simply by launching Python or pip.

What’s new

Microsoft’s investigation found that the malicious LiteLLM 1.107.0 package included files placed into the Python environment’s library path:

  • cook.pth
  • cook.py
  • sitecustomize.py

These files were designed to run during normal Python interpreter initialization.

Key findings

  • Automatic execution: The payload could run when Python started, without importing LiteLLM.
  • Credential theft behavior: The collector targeted developer tools, cloud credentials, browser data, SSH material, environment variables, and LiteLLM-related database data.
  • Multiple execution paths: Microsoft identified both a .pth-based collector and a Unix-oriented sitecustomize.py loader.
  • Potential persistence risk: Removing only the LiteLLM application directory may not remove the malicious startup files.
  • Container exposure: Official container images also distributed the compromised release.

Microsoft also notes an important investigation caveat: do not start Python or pip inside a suspect environment just to check for the package, because doing so could trigger the malware.

Impact on administrators and security teams

This incident affects more than AI gateway deployments. Organizations using LiteLLM 1.107.0 on:

  • Developer workstations
  • CI/CD agents
  • Test environments
  • Containers
  • Proxy servers

should treat those environments as potentially exposed.

The compromise may have allowed attackers to access API keys, cloud credentials, package manager secrets, browser-stored data, and other sensitive authentication material available to the affected identity. Microsoft also warns that deleting the package or removing a release tag is not sufficient recovery.

IT and security teams should:

  • Identify any systems that installed LiteLLM 1.107.0 or used affected container images.
  • Avoid launching Python in suspect environments during initial triage.
  • Inspect Python library paths for cook.pth, cook.py, and sitecustomize.py.
  • Terminate surviving malicious processes and rebuild or replace compromised Python environments.
  • Rotate credentials that may have been accessible, including cloud, developer, and application secrets.
  • Use Microsoft Defender detections and hunting guidance from Microsoft’s security blog to investigate exposure.

Bottom line

The LiteLLM 1.107.0 compromise is a high-impact Python supply chain incident because execution could happen during routine interpreter startup. For defenders, the priority is to contain affected environments, validate whether credentials were exposed, and perform full recovery rather than relying on package removal alone.

Need help with Security?

Our experts can help you implement and optimize your Microsoft solutions.

Talk to an Expert

Stay updated on Microsoft technologies

LiteLLMsupply chain attackPythoncredential theftMicrosoft Security

Related Posts

Security

ARTEX AI Attacks Drive ConnectWise Supply Chain Breach

Microsoft says China-aligned actor Storm-0940 used the ARTEX agentic AI framework to automate large-scale attacks and accelerate the ConnectWise supply chain compromise. The campaign reached thousands of Microsoft 365 tenants, abused OAuth applications, and in some cases achieved privileged cloud access in under three hours.

Security

Microsoft Security Unveils Agentic Insider Controls

Microsoft outlined a new security approach for AI agents, treating them as "agentic insiders" that need explicit identity, least-privilege access, and continuous containment. The update expands Project Perception, Entra Agent ID, local agent discovery, and introduces Dynamic Permissions to help IT and security teams manage agent risk at machine speed.

Security

Open-Weight Model Risk Guidance for Enterprises

Microsoft and NVIDIA have released new guidance to help enterprises assess and manage risks when deploying open-weight AI models. The paper introduces a shared risk taxonomy, maps risks to evaluations, and explains how safeguard responsibilities shift depending on deployment architecture and control ownership.

Security

Phishing Infrastructure Ecosystem Exposed by Microsoft

Microsoft has detailed a Chinese-language phishing infrastructure ecosystem involving YAM Store and multiple phishing kits that enabled large-scale credential theft campaigns worldwide. The findings matter for IT and security teams because the operation abused Microsoft 365, Azure, SharePoint, and cloud identities at scale, highlighting the need for stronger tenant monitoring, app governance, and phishing defenses.

Security

Post-Quantum Authentication: Start PKI Testing Now

Microsoft is urging organizations to begin testing certificate ecosystems now for post-quantum authentication readiness. The company’s PQC TLS Pilot Program and Windows 11 support for ML-DSA certificates give PKI teams a controlled way to identify interoperability, performance, and operational issues before production adoption becomes necessary.

Security

Frontier AI Vulnerability Research: 3 Security Lessons

Microsoft Security’s FORGE Lab shared three operational lessons from using AI for vulnerability research at scale across Windows and open-source software. The findings show that the real challenge is no longer just discovering bugs with AI, but validating, deduplicating, and remediating them fast enough to turn research into shipped security fixes.