LiteLLM 1.107.0 Compromised: Credential Stealer and Backdoor Detected on PyPI

·
·
3 min read
·
AI-assisted
Author Profile
by Albert Schaper
Share
LiteLLM 1.107.0 Compromised: Credential Stealer and Backdoor Detected on PyPI

On October 21, 2026, the LiteLLM 1.107.0 package on PyPI was compromised, installing a credential stealer and remote-code backdoor that harvested tokens from AI development tools like Claude Code, Cursor, and Copilot, alongside SSH keys and cloud credentials.

Details of the Compromise

The malicious LiteLLM 1.107.0 package, distributed across all seven platform wheels (Linux, macOS, and Windows), incorporated a sophisticated attack mechanism. The malware was designed to activate whenever any Python process initiated on an infected system, primarily due to a planted cook.pth file. This file acted as a loader, initiating the credential-stealing process.

Further investigation revealed that the attackers successfully stole GitHub CLI credentials from three developers and subsequently hijacked LiteLLM's official build pipeline. This allowed the malicious artifacts to be built, signed, and published using LiteLLM's own infrastructure, lending them an appearance of legitimacy.

Malware Functionality and Impact

The compromise involved three distinct files:

  • cook.pth: A loader file that ensured the malware executed with any Python process.
  • cook.py: The primary credential stealer module.
  • sitecustomize.py: An hourly backdoor daemon, providing persistent remote code execution capabilities.

The credential stealer was designed to harvest a wide array of sensitive information. This included tokens from various AI dev tools such as Claude Code, Cursor, Windsurf, Copilot, Gemini CLI, Codex, and Hugging Face. Additionally, it targeted SSH keys, AWS, Azure, and GCP credentials, CI/CD secrets, browser passwords, and keys for various LLM providers. Stolen data was encrypted using AES-256-CBC, key-wrapped with RSA-OAAP, and then transmitted via POST requests to www.litellm[.]dev/healthcheck.

The implant was introduced through a single line, maturin data = "cook", added to the sdist's pyproject.toml file.

Affected Docker Images and Remediation

Beyond PyPI, infected Docker images were also live on Docker Hub and GHCR. These images were available between 11:46 UTC and 14:20 UTC on October 21, 2026. While PyPI removed the compromised package swiftly, users who pulled Docker images during this window may have been exposed.

LiteLLM has confirmed the compromise in an official incident report. Users who installed LiteLLM version 1.107.0 are strongly advised to downgrade to a clean version and immediately rotate all credentials that may have been exposed. Clean versions identified include 1.106.2, 1.107.0rc1, and 1.107.0rc2. For developers using LiteLLM, verifying the installed version and taking corrective action is critical.

Key Takeaways for Developers

  • Immediate Action: If you installed LiteLLM 1.107.0, downgrade to a clean version (1.106.2, 1.107.0rc1, or 1.107.0rc2) and rotate all potentially compromised credentials.
  • Supply Chain Vigilance: This incident underscores the importance of verifying software packages, even from trusted sources like PyPI and Docker Hub.
  • Credential Security: Regularly review and rotate API keys, cloud credentials, and SSH keys, especially after any suspected security incident.
  • Monitoring: Implement robust monitoring for unusual network activity or unauthorized access attempts within development environments.

Conclusion

The compromise of LiteLLM 1.107.0 serves as a critical reminder of the persistent threats within software supply chains. The swift action by PyPI to remove the malicious package, coupled with LiteLLM's incident report, provides a clear path for remediation. Developers must remain vigilant, prioritize security best practices, and promptly address advisories to protect their systems and data from sophisticated attacks.

Sources

About the Author

Albert Schaper avatar

Written by

Albert Schaper

Albert Schaper is a co-founder of Best-AI.org. He focuses on product strategy, AI adoption, practical tool selection, and educational content that helps users compare AI products with clearer context.

More from Albert

Was this article helpful?

Found outdated info or have suggestions? Send us a note.

Discover AI Tools

Find your perfect AI solution from our curated directory of top-rated tools

Less noise. More results.

One monthly email with the industry news tools that matter - and why.

No spam. Unsubscribe anytime. We never sell your data. See our Privacy Policy.

What's Next?

Continue your AI journey with our tools and resources. Whether you're looking to compare AI tools, learn about artificial intelligence fundamentals, or stay updated with the latest AI news and trends, see what fits your needs. Explore our curated content to find the right AI tools for your workflow.