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

SCKit ScreenConnect Attack: MSPs Must Hunt Now

Microsoft Threat Intelligence confirmed a campaign abusing ConnectWise ScreenConnect to deploy unauthorized remote-access clients and the SCKit worm on MSP-managed endpoints. The activity can also target technician sessions, making this a high-priority incident for defenders because removing a rogue client alone does not eliminate persistence or invalidate exposed sessions.

Security

AI Agent Supply Chain Attacks Target Coding Tools

Microsoft Security researchers detailed two post-training supply chain attack paths that can backdoor coding and terminal agents: dataset poisoning and model poisoning. The findings matter because compromised agents can misuse tools, execute commands, and access sensitive environments even when prompts appear benign, reinforcing the need for stronger controls around training data, model provenance, and tool permissions.

Security

GSocket C2 Abuse: Microsoft Warns of Stealthy Persistence

Microsoft has observed multiple threat actors deploying the open source GSocket remote access tool on compromised Linux web servers to maintain access after the original vulnerability is patched. The technique relies on outbound-only encrypted connections through a shared relay network, making traditional IP or domain blocking far less effective and raising the need for host-level investigation and egress monitoring.

Security

Linux Kernel Bug Reports: 59 Findings From Microsoft

Microsoft’s FORGE Lab detailed how its MDASH project turned 26,502 Linux kernel scan findings into 59 upstream bug reports and 33 CVEs, with 38 fixes already merged. The research highlights both the promise of AI-assisted vulnerability discovery and the continued need for expert validation, patching, and coordination with upstream maintainers.

Security

AI Sleeper Agent Threat: Microsoft Shares Defenses

Microsoft Research says AI models can be backdoored by editing fewer than 10 neurons, creating sleeper agents that pass evaluations but execute attacker commands when triggered. The findings matter because autonomous agents often run with privileged access, making model weight integrity, auditing, and runtime controls critical for enterprise AI security.

Security

Rust Memory Safety Issues Found by Microsoft FORGE

Microsoft FORGE Lab disclosed several memory safety issues in Rust’s standard library, including cases where safe Rust code could still trigger undefined behavior. The research, aided by the Hyenas AI vulnerability-scanning system, highlights recurring unsafe-code design pitfalls that matter for developers and security teams relying on Rust at scale.