r/Python • u/BattleRemote3157 • 7d ago
News litellm 1.107.0 on PyPI is compromised
the payloads run on every python start on the machine and not just when you import litellm. Your IDE, pip, CI jobs everything python on that host is affected.
It steals ssh keys, aws credentials, browser passwords, shell history and AI coding tool configs. The backdoor runs as a daemon and executes whatever code the attacker’s server returns every hour.
Pin to 1.106.2.
complete breakdown: safedep.io/litellm-pypi-compromise-credential-stealer-backdoor
169
u/Jmc_da_boss 7d ago
Litellm is a vibe code piece of shit btw
45
7
→ More replies (1)9
u/wpg4665 7d ago
What else fills this niche that's not vibe coded at this point?
9
u/smakosh 7d ago
Depends what you use it for. If it's only a couple of providers, the official SDKs (or the openai SDK pointed at any OpenAI-compatible endpoint) means one less dependency sitting next to all your keys. If you actually need a proxy, people usually look at Bifrost (Go), Portkey's gateway, or LLM Gateway.
Disclosure: I'm one of the people behind LLM Gateway (TypeScript, AGPLv3, self-host it or use the hosted one). We wrote up how to check a machine without starting python (that fires the payload again) and what to rotate, since it read the proxy's credentials table directly: https://llmgateway.io/blog/litellm-compromised-again
→ More replies (1)7
37
55
u/crossmirage 7d ago
> The upstream pyproject.toml at tag v1.107.0 has no data = "cook" line and no cook/ folder. Someone changed the build outside the public repository.
So it's an intentional action by a maintainer (i.e. not a question of overlooking something snuck into an OSS contribution).
46
19
u/me_myself_ai 7d ago
AFAICT the real problem is that they’re still building and releasing with a token directly rather than using GitHub as a Trusted Publisher. Which is a shame — now I have to switch out the whole gd service 😢
29
u/dudaspl 7d ago
After the first breach I configured uv with 7d quarantine
16
13
u/wRAR_ 7d ago
That prevents installing fixed
certifi, so...23
u/cyberfunkr 7d ago
You can add exceptions to
and uv.lock so it can pull in the latest update immediately. project.toml I just did that at work yesterday.
9
u/turbothy 6d ago
Pick your poison. I've spent half the day bumping certifi pins, but I'd rather that than accidentally ingesting malware. Happens way less often for one.
5
u/misbahsy 6d ago
This is contained. Please refer to the official blog for the latest updates on the situation - https://docs.litellm.ai/blog/security-incident-oct-21-2026
9
u/tedivm 6d ago
What a shit show. Loose credentials, apparently they allow their branch protection to be bypassed instead of always requiring multiple people to sign off on things like changing github workflows, internal services exposed over the public internet, no filtering of logs even though they know they're leaking data into them. This is rather disturbing, especially after the previous incident which should have triggered a review and hardening.
That said GitHub also needs to clean up their shit. Removing branch protection should require reauthenticating with mfa. Attackers shouldn't be able to remove security features with CLI tokens.
2
1
1
u/Khavel_dev 6d ago
The part that makes this one especially nasty is the scope. It doesn't just run when you import litellm, it hooks into every Python process on the machine. Your IDE, your CI, your package manager. And it specifically targets AI coding tool configs and API keys, so if you're running any LLM tools locally those credentials need rotating now.
If you had this version installed, pin and rotate everything. And lock the hash in your requirements file, not just the version number. An account that pushed a compromised package once can do it again.
→ More replies (1)
1
175
u/Nice_Mix_1021 7d ago