LiteLLM Master Key Leak Leads to Malicious Package Update
Share
LiteLLM has disclosed that a master key accidentally leaked on GitHub allowed attackers to compromise its release pipeline and distribute a malicious version of its software.
The security incident stems from a configuration file committed to a public LiteLLM repository on 27 May 2026. This file inadvertently contained the master key for an internal deployment, which threat actors subsequently harvested. While the initial leak occurred in May, the full extent of the exploitation and the subsequent disclosure surfaced in October 2026.
Credential Harvesting and Package Hijacking
After obtaining the master key, the attackers were able to access an internal Agent Platform. From there, they successfully stole GitHub tokens belonging to the project. These credentials provided the necessary permissions to interfere with the automated release process for the LiteLLM Python package.
The threat actor used this access to distribute a compromised version of the library. LiteLLM is a widely used Python package designed to provide a unified interface for various Large Language Models (LLMs), meaning a malicious update could potentially impact a significant number of developers and AI-driven applications.
Remediation and User Action
Upon discovering the breach, LiteLLM revoked the leaked master key and the affected GitHub tokens. The company has since secured its release pipeline to prevent similar unauthorised access. Developers using the package are advised to ensure they are running the latest verified version and to audit their environments for any unusual activity.
This incident highlights the ongoing risks of secret leakage in public repositories, a common vector for supply chain attacks. Automated tools for secret scanning can help mitigate these risks by alerting developers when sensitive credentials, such as API keys or master tokens, are committed to version control systems.




Leave a Reply