A compromised LiteLLM release published to the Python Package Index on October 21, 2026 ran credential-stealing code whenever Python started, even if nothing imported LiteLLM. Microsoft says the package was also distributed through official container images.
LiteLLM is a gateway that sits between applications and AI model providers. Microsoft says that position can give it access to model-provider API keys, database connection strings, workload identities and routing configuration. The package also runs on developer workstations, build agents, test systems and containers, which widened the exposure.
The malicious files exploited Python's normal startup process. Microsoft analyzed two paths: a credential collector launched through a path extension, and a Unix-oriented loader kept in place through site-specific configuration. The collector targeted developer tools, AI applications, cloud environments, browsers and infrastructure. A separate database module tried to read selected credential and model-configuration records from the LiteLLM proxy. In one Windows case, a routine Python command to install an unrelated dependency triggered the collector.
LiteLLM maintainers say stolen developer GitHub credentials were used to redirect the release workflow to a lookalike repository. Microsoft says removing the package or a release tag does not complete recovery, because the Python environment, surviving processes and reachable credentials must also be addressed.