Compromised LiteLLM 1.107.0 on PyPI Installs a Credential Stealer and Backdoor (safedep.io)
linsomniac 4 hours ago
dropbox_miner 4 hours ago
rsanheim 2 hours ago
Okay, checked, it was March of this year: https://futuresearch.ai/blog/litellm-pypi-supply-chain-attac.... What even is time anymore in the llm age?
atmosx an hour ago
crossroadsguy 5 hours ago
At one point permission pop-up fatigue sets in we start giving any permission as if it's normal. We also become desensitised to isntalling tools: brew, npm, it becomes second nature.
"Oh, those 367 tools installed by package X? Yeah yeah, must be normal, that's how all these work now".
"Brew shows 59 packages outdated?". "Must upgrade". "Yeah, done. Perfect".
And the advent of agents and harnesses. It's not a matter of whether, it's when! OSes need to do something about it. Help users have complete separate "program space" at ease with better, easier, and lighter VMs if nothing else. I know, I know - Unix and Linux solved all this even before Alexander III of Macedon started wearing his nappies. Of course.
abhisek 4 hours ago
Sandbox comes in for the unknown ones and yes, its a pain to get the profile right.
lrvick 3 hours ago
From some of them perhaps, but plenty hide for -years- undetected.
nvme0n1p1 3 hours ago
caaqil 4 hours ago
I mean, didn't Linux shells invent pop-up fatigue? I thought we (yes, we) all used to -y flag preemptively so the upgrades and installations/setups go through. Linux really did do it first, the agents are just more needy and their popups more verbose now, but not exactly new.
VM isn't a silver bullet.
fc417fc802 2 hours ago
Either way it's got nothing to do with security - I was never going to catch a vulnerability in the central debian repos by reading a list of dependent packages.
isityettime 8 minutes ago
cptmurphy 4 hours ago
fdsjgfklsfd 3 hours ago
hoppp 2 hours ago
tensegrist 33 minutes ago
isityettime 2 hours ago
No, you can block this with sandboxing tools. For my LLM agents, I use a tool called Nono, whose macOS implementation is built on the same foundation as sandbox-exec. One of the key features it supports (and it's not the only tool that does this) is proxying and the injection of credentials via the proxy. For example, when I run Codex at work, Codex does not have access to my Azure AI Foundry API credentials. It sends out requests via dummy credentials, and the proxy injects the real ones outside the sandbox.
The other thing that proxy does is let you restrict network access in various ways. So you can run something like LiteLLM so that it doesn't have access to the internet at large; it can only talk to Azure AI Foundry or AWS Bedrock or whoever your inference provider is. You sandbox LiteLLM separately from your agents, and you give it access to much less. The software firewall stuff isn't perfect but it is a significant defense against things like this.
There are also lots of other restrictions that are easy to do which mitigate this. Nono blocks access to the root of $HOME, then selectively allows access to paths within it, and also explicitly blocks access to common paths to secrets. So it's pretty easy to make sure that access to important things are blocked: SSH credentials, GnuPG socket (and local Unix sockets in general), local OS keyrings, etc.
The way I use tools like this is exclusively by writing policy, testing it, and revising where the policy is inadequate. I never get approval fatigue because I don't do approvals.
You're right that attacks like this are hard to defend against, and that we're used to tool sprawl, and also that LLMs can do things like install tools we don't expect them to themselves! But there are ways to anticipate and mitigate attacks like this. Sandboxing tools (including contained and VMs) that support credential injection are genuinely useful for this.
drdaeman an hour ago
LiteLLM is frequently used in roughly the same scenario - trading virtual LAN-only keys for real ones as it relays requests to the inference providers.
isityettime 11 minutes ago
LiteLLM isn't a sandboxing tool so it just can't perform as much risk reduction even when everything is working as intended.
And what nono adds over sandbox-exec is a uniform interface across platforms and some policy management tools. You can impose the same restrictions via the OS built-in mechanisms yourself via Seatbelt or a built-in interface like sandbox-exec. You can also combine an OS-level sandboxing tool like nono, zerobox, Anthropic's srt, Seatbelt, landrun, Bubblewrap, Fence, etc., with a VM-based one like Docker's sbx, smolvm, krunvm, microsandbox, or Shuru. So now you need two simultaneous supply chain attacks in unrelated projects to line up just right at the same time.
"Eventually you have to trust some part of your security stack" is neither particularly interesting nor evidence that there's no way to defend against supply chain attacks. Even if you only have one sandboxing tool and it's OS-level rather than VM-based, that becomes a single part of your stack that you can give special attention to in evaluating updates in a way that LiteLLM can't be.
atmosx 10 minutes ago
pkulak 5 hours ago
zargon 5 hours ago
pkulak 5 hours ago
rirze 4 hours ago
cromka 4 hours ago
yujonglee 3 hours ago
arcanemachiner 3 hours ago
crossroadsguy 5 hours ago
Aurornis 4 hours ago
> No public commit in BerriAI/litellm contains data = "cook" or a cook/ folder.
> SafeDep assesses, with moderate to high confidence, that BerriAI’s private release pipeline built these wheels from an attacker-modified git source.
threecheese 3 hours ago
They revoked all but one developers, which is probably the right approach, but I'd pin LiteLLM to "something before this version" and keep it there until further notice!
madamelic 6 hours ago
All I read was that it creates a directory from the build file but seemingly no description how new files or added dependencies slipped by. Was `cook.pth` a dependency that got automatically downloaded from PyPI on install and then the build system put it into dependencies?
--
Leaving this for others:
> BerriAI’s private release pipeline built these wheels from an attacker-modified git source. The attacker could have used a compromised maintainer or bot credential, a private branch or mirror, or the reference the pipeline builds from. A stolen PyPI token used from the attacker’s own machines fits the evidence less well.
Makes sense. It was that a maintainer or the private pipeline was attacked and the malicious dependency was injected there by squatting on the maintainer's local copy rather than the dependency being hijacked for everyone. Very clever.
aakashpawar 6 hours ago
What would catch it is someone rebuilding from the public tag and comparing the result, which almost nobody does for the python wheels. I have been treating attestations as the answer for my own project's releases, so this is a good reminder of where they stop.
yujonglee 4 hours ago
stbenjam 7 hours ago
rcleveng 7 hours ago
Risk is ensuring enough security researchers are finding these and quarantining these before that default cooldown lapses.
stbenjam 7 hours ago
robinhoodexe 7 hours ago
I’m unsure how to automate this properly, maybe an LLM is the best starting point.
mbrumlow 6 hours ago
fmbb 6 hours ago
dlkasajiewo 6 hours ago
mattstir 6 hours ago
happyPersonR 2 hours ago
tikkabhuna 6 hours ago
Ultimately, you need someone to verify releases and that probably means paying for it. I know Sonatype paid solutions utilise their own internal research to allow/block new releases.
trollbridge 6 hours ago
giancarlostoro 7 hours ago
0c3ca83 5 hours ago
whatshisface 4 hours ago
0c3ca83 4 hours ago
Muromec 3 hours ago
comboy 3 hours ago
stratos123 an hour ago
galoisscobi 5 hours ago
sunbum 4 hours ago
happyPersonR 3 hours ago
saasisdead 5 hours ago
starfallg 5 hours ago
luke-stanley 4 hours ago
tech_solver 7 hours ago
baddash 6 hours ago
TZubiri 6 hours ago
I'm not saying everyong should migrate after there's a vuln, but I'm definitely saying that. Unless it's something huge and foundational like a programming language (PHP gets a second chance), just migrate within the next couple of weeks.
I didn't even have it installed the first time, so the ideal programmers, (read, your competition), actually suffered 0 vulns from this dep, if you suffered 1, that's already pretty bad, being burnt twice should be a wake up call. If you get hit 3 times by the same dependency, it's a lost case.
john_strinlai 6 hours ago
second? i haven't kept count, but we have to be somewhere in the hundreds of chances now
wongarsu 6 hours ago
If it matters, I am mostly interested in the aspect of having a proxy that unifies multiple ollama and openai-compatible endpoints with model-based routing and failover. Optionally with api-keys, reporting, budgets, etc. I do not particularly care about the MCP gateway, Agent-To-Agent thingy, and whatever else LiteLLM bolted on over time
tkz1312 6 hours ago
spike021 6 hours ago
tkz1312 6 hours ago
Cu3PO42 5 hours ago
That said, I am looking into alternatives. Two times in one year is really a terrible look.
connorbrinton 6 hours ago
dannyboland 6 hours ago
Now that AI makes it cheaper to build such tools in-house, the case for adopting a maximalist framework and trusting that entire supply chain is a lot weaker.
HumanOstrich 3 hours ago
I don't think memory safety would have helped here.
> the case for adopting a maximalist framework and trusting that entire supply chain is a lot weaker
You mean the Rust ecosystem?
TZubiri 5 hours ago
Taking the definition from another user on this comment-chain:
"an OpenAI compatible endpoint routing across multiple providers based on latency"
If the endpoint is truly OpenAI compatible, you can just switch out the vendor by switching out the HTTP address, we are talking potentially about a single line change.
- LLM_HOST = "api.openai.com" + LLM_HOST = "api.competitor.com"
It sounds silly, but remember that software is a winner-takes all game, 99% of devs will lose, so if you are seeing 99% of devs do the same thing, it isn't surprising that it's a grossly wrong choice. It takes skill and guts to be in the 1%, reject the mainstream trends, and just write code without grasping at external imports to do even the most basic things.
I'd like to take this opportunity to sell out, I'm open for contracts if you are looking for a remote 1% dev. Early stage startups only, email in userpage.
hoppp 2 hours ago
antonvs 5 hours ago
Turns out Ancient Aliens was onto something all along.
rcleveng 7 hours ago
cyanydeez 6 hours ago
taylorfinley 5 hours ago
hmokiguess 6 hours ago
> OSS Users > For the time being, please pin your version to 1.106.2 or any explicit version published prior to now.
> Enterprise Customers > There currently exists a private LiteLLM registry for enterprise customers, in which we are distributing an embargoed release that remediates a vulnerability whose disclosure date is scheduled for October 27. Our private registry is not affected. If you are an enterprise customer pulling from our private registry you are not affected.
wongarsu 5 hours ago
Seems a little unethical
ctxc 5 hours ago
wongarsu 4 hours ago
1. there is a second vulnerability that will be disclosed next Tuesday (can't be this one because talking about it as undisclosed in the GH issue disclosing it makes no sense)
2. the patch for that vulnerability is somewhere in the diff between $current_public_release and $current_enterprise_release
3. You have to pay to get $current_enterprise_release
They might not be selling the vulnerability directly, but they are selling access to the patch that fixes it. Which would be enough of a hint even in pre-LLM times. And unlike other vendors they don't just claim "you get faster updates and additional features" or something like that, they directly point out that if you buy now you get advance access to the fix to an unannounced vuln
I'm not saying they are advertising this to bad actors. But if they wanted to do that with a shred of plausible deniability, this would be the way to do it
chias 3 hours ago
There exists a critical vulnerability which affects only Enterprise LiteLLM deployments, and does not affect OSS deployments.
We have provided our customers with patched releases distributed via a private registry and are allowing them some time to update their deployments before we release the fix in our public registry and disclose the vulnerability details. Releasing the fix publicly in an open source product would be a de-facto vulnerability disclosure.
avereveard 5 hours ago
nairboon 3 hours ago
mihaaly 2 hours ago
santiago-pl 7 hours ago
However, if anyone is looking for 20x faster and less "targeted" LiteLLM alternative - I'm work on one in Go. That's why GoModel it's called. https://github.com/ENTERPILOT/GoModel/
ghrl 7 hours ago
I myself have written a small llm proxy in Go, doing nothing but injecting the real API key to outgoing requests while itself validating virtual keys it generates, and it works great.
santiago-pl 7 hours ago
TZubiri 6 hours ago
toxik 4 hours ago
verdverm 4 hours ago
- being resilient to upstream provider downtime
- centrally managed config/controls
- visibility and allocation into usage and costs
We are deploying a gateway at work primarily for these three.
At home, GoModel's virtual models have been super helpful for testing out new open weights. I can change the model deployed in vLLM without having to change any of my downstream tools, which get a stable name.
merelydev 5 hours ago
infecto 7 hours ago
cyanydeez 6 hours ago
Agents and malware will eradicate all goodwill left.
Good by internet.
abhisek 6 hours ago
TZubiri 6 hours ago
Tell em Tom Zubiri sent ya (I don't get a commission, just good karma)
edoceo 6 hours ago
I use it, I don't cooldown, proper version pinning for me.
wallrat 2 hours ago
syntaxing 6 hours ago
abhisek 6 hours ago
callamdelaney 7 hours ago
nkjoep 7 hours ago
hungryhobbit 7 hours ago
worldsavior 5 hours ago
/s
antonvs 5 hours ago
1-6 6 hours ago
1vuio0pswjnm7 6 hours ago
1792590232 | Litellm 1.107.0 Compromised | https://github.com/BerriAI/litellm/issues/47826 | https://news.ycombinator.com/item?id=50180845 | 0 comments
0xbadc0de5 7 hours ago
jiwidi 7 hours ago
stbenjam 7 hours ago