PyPI Supply Chain Attack Compromises LiteLLM, Enabling the Exfiltration of Sensitive Information
<img src="https://res.infoq.com/news/2026/03/litellm-supply-chain-attack/en/headerimage/litellm-supply-chain-attack-1774987285804.jpeg"/><p>Discovered by FutureSearch researcher Callum McMahon, a supply chain attack against LiteLLM on PyPI resulted in over 40 thousand downloads of a compromised version that installed a malicious payload capable of harvesting and exfiltrating sensitive information. LiteLLM is downloaded roughly 3 million times per day.</p> <i>By Sergio De Simone</i>
Discovered by FutureSearch researcher Callum McMahon, a supply chain attack against LiteLLM on PyPI resulted in over 40 thousand downloads of a compromised version that installed a malicious payload capable of harvesting and exfiltrating sensitive information. LiteLLM is downloaded roughly 3 million times per day.
As Andrej Karpathy noted on X, the malware was capable to exfiltrate SSL and SSH keys, Cloud provider credentials, Kubernetes configurations, Git credentials, API keys, shell history, crypto wallets, and many other kinds of secrets.
As McMahon explains, the attack affected the litellm 1.82.8 package:
It started with my machine stuttering hard, something that really shouldn't be happening on a 48GB Mac. htop taking 10s of seconds to load, CPU pegged at 100%, all signs I'll be working on my local env for a while… After failing to software reset my Mac, I took a final picture for evidence and hard reset.
After promptly reporting the compromised package to the PyPI security team and the LiteLLM maintainers, the affected package where quarantined within approximately 40 minutes. However, the risk extended further, as any packages depending on litellm version 1.82.8 were also indirectly compromised.
According to McMahon, all it took for his system to be compromised was launching a local MCP server through Cursor. This triggered the download of the latest LiteLLM package, which happened to have been compromised just minutes earlier. However, a flaw in the implementation of the malware itself caused the LiteLLM process to recursively fork, eventually bringing McMahon’s system to a complete halt:
The .pth launcher spawns a child Python process via subprocess.Popen, but because .pth files trigger on every interpreter startup, the child re-triggers the same .pth — creating an exponential fork bomb that crashed the machine.
Without this mistake in the implementation, the malware would have gone unnoticed for much longer, noted Karpathy, with much greater damage.
Point Wild, provider of AI-powered cybersecurity, has open-sourced a dependency scanner to help developers assess the impact on their dependencies. The tool, who-touched-my-packages (wtmp), combines behavioral analysis and AI-driven detection to flag zero-day supply-chain threats, going beyond the coverage offered by conventional vulnerabilities checkers.
FutureSearch released a litellm-checker tool to help package maintainers determine whether their projects were impacted by the supply chain attack.
The LiteLLM team reported that the supply chain attack was enabled by a vulnerability in Trivy, which made it possible for the attackers to gain unauthorized access to the LiteLLM publishing pipeline.
For additional details on the supply chain attack and the malicious payload deployed by the malware, see McMahon's original post and Snyk's detailed analysis.
About the Author
Sergio De Simone
Show moreShow less
Sign in to highlight and annotate this article

Conversation starters
Daily AI Digest
Get the top 5 AI stories delivered to your inbox every morning.
More about
versionmillionresearchAmazon Q Developer Accelerates AWS DMS Conversions - Let's Data Science
<a href="https://news.google.com/rss/articles/CBMilwFBVV95cUxNSV9fWGRVS0FoaTNtWk9WNm9NZWUxUEZTMEp2MGtnbVo0Snh5bHVpSEdUR1pjRGxjNFNhWjJXMXg4dHgtcENLdGNvN0hwUFl1VzN2eXFPTnNvYV9aQ0ZNN0o5R3ZSTmZFS3hiZXVhNkkyQ0ZTN3U3dGNDQlVtUFU1bUd3REIwOEZKZV93YnFlRFJlT2k1UUZB?oc=5" target="_blank">Amazon Q Developer Accelerates AWS DMS Conversions</a> <font color="#6f6f6f">Let's Data Science</font>
Baidu’s AI Assistant Reaches Milestone of 200 Million Monthly Active Users - WSJ
<a href="https://news.google.com/rss/articles/CBMitANBVV95cUxQdzNXLWlzcDQyanVrX1Fna2tDak9VNFpNOHE3STFoYmQ3X3RYbkhNT1dMeE5RSXA5M1RLS3JzOUl5U2xIcmh1MUZnbFdHbGY1eE1KVVJsY0M3RXpaaTA3aTcxYlhmZkthcEphN09RUC1HdEdZTjZVZFJvck9oeUJsQXBaOUpDMUp6WHpWWm1VemUyMWNHUTdaZHppeFFNb19vYUN5WmQ4WUs2ai04UEFRUGNWSm5NMjRMa28zUVR2ZkhxcGQ2LWJld1QtSkRaMktMUVkxUE41Q2t3bUNoNkJvem8tOHRnbF9ZVlJsUTJqTUN0c3lZNjQydk9LekZrcWxTMU5JUnNsbUpjYWItY1hCTUtNaXdreGdGNGxHX0x4ZjlNX1hkYjVPZ2tldE5fWU9aVFJicWsyV3hVNE9JeGwwUy15dklzNDZrdHp2Y09SUFVoeEZHRFBVR1hkem0wM0hoczBoSjA4bzFOS3dLU19TbEhoUVhWeXlBUlZrZ0xrUUhqUlNzdDMxRUxIRGlOcFJfVmpMbExfT2MzYXIwME9hNThlUm0tYjNmaUdyeHpodGJQOHZG?oc=5" target="_blank">Baidu’s AI Assistant Reaches Milestone of 200 Million Monthly Active Users</a> <font color="#6f6f6f">WSJ</font>
Your String is Not What You Think It Is
<h1> Your String is Not What You Think It Is </h1> <h2> A Tour Through the Encoding Wars, and Why <code>len("café")</code> Returns 4 </h2> <p><em>Reading time: ~13 minutes</em></p> <p>You called <code>len("café")</code> and Python told you 4. You passed that string to a function that encoded it to bytes. The bytes were 5 long. You stared at the screen for longer than you'd admit.</p> <p>Then you got a bug report from a user in Brazil whose name broke your database. Your colleague on a Windows machine opened the CSV you exported and saw <code>é</code> where there should have been <code>é</code>. You fixed it by guessing — add <code>.encode('utf-8')</code> here, <code>.decode('utf-8')</code> there — and it stopped crashing.</p> <p>But if someone asked you <em>why</em>, the honest answer is
Knowledge Map
Connected Articles — Knowledge Graph
This article is connected to other articles through shared AI topics and tags.
More in Models
Gemini Robotics 1.5 brings AI agents into the physical world - Google DeepMind
<a href="https://news.google.com/rss/articles/CBMikwFBVV95cUxNRkVPWk1mSmpCZ0NONlZUVEJLTmd5VGk3SHJEWHE3ZERPc3l0MmVieG5DMUVaS0FhZzJ3cHZkZEVCM3oyTm50SGtWMXZvTHJ6MV9haWF2b3pveHNQR1FXcnpja3doSk9vbDNsdVRaRFZxNXJZX3lGc1pwVTY1QTluNHktX3ZlOXg3ZEtUeUtNQXZHTlE?oc=5" target="_blank">Gemini Robotics 1.5 brings AI agents into the physical world</a> <font color="#6f6f6f">Google DeepMind</font>
Doge staffers used ChatGPT to cut federal grants worth millions - KITV
<a href="https://news.google.com/rss/articles/CBMi2wFBVV95cUxNNVBId0tCRVJqNkNEQkVoWjBwOWpQUXpXOFQzd2F5UEtHTGwzNWxIYnpCU3ZNQU1VQkdEckZEX2VHU2kydDBXMHBWdF84MVEtYTdodDhiZ25KVktaQVQ2NzNGSWRrblV2VmJPRF9CMEhWS2psMllqQ0YzbUpWcEZpM0lwbWNVWnVkTENzaUI0ZS1EeDFURTcwZ200ekNtRS1WNzlySFF2U2MxaWdBOW5sUHVaa19hWlNGZW92TUtKQXV4c2F3dzVtVllDSlREWDhUY21Fa0lDZy04bVk?oc=5" target="_blank">Doge staffers used ChatGPT to cut federal grants worth millions</a> <font color="#6f6f6f">KITV</font>
Ensemble + Cohere to Deliver First RCM-Native LLM for Healthcare - National Today
<a href="https://news.google.com/rss/articles/CBMivwFBVV95cUxQUEpfV25RVm55bGFEWmpzbTZxb2hZZWdpYmhaUEFxaEY4dE5SckI5bFZjYlNWN19QUGVCREdUengydDJiNzBwdWNEM3F1cm1BUEZiYU1YUERzUmNRekJDWHpvTi1PZVBZMU11N29xMGZGMlZmR3NaS0lVYVRCeUdqM28tY29XNTUxVEJuWVVmOG1qNnM5REg1LW1qdGFqOUx6aVNDTEl6UVc0dW1randSNkVDQ0JWOGlNcHBWM09pNA?oc=5" target="_blank">Ensemble + Cohere to Deliver First RCM-Native LLM for Healthcare</a> <font color="#6f6f6f">National Today</font>
Anthropic Leaks Claude Code, a Literal Blueprint for AI Coding Agents - eweek.com
<a href="https://news.google.com/rss/articles/CBMiekFVX3lxTE4wQVkzQVlOWnBaVWozLWNBdUpYakZKYWFtNFI2YnZoaEFiNjFfWVNrcWlYVFg1U244cVR5YXlTUlp3M3lJRWlxLV9rclJNaHg5SGlzZUxObDZGRG43VHBldkdUYmgtdldJVEdtbVlYVXZWdi1NMk1QT2dB?oc=5" target="_blank">Anthropic Leaks Claude Code, a Literal Blueprint for AI Coding Agents</a> <font color="#6f6f6f">eweek.com</font>
Discussion
Sign in to join the discussion
No comments yet — be the first to share your thoughts!