logoalt Hacker News

Tell HN: Litellm 1.82.7 and 1.82.8 on PyPI are compromised

438 pointsby dot_treoyesterday at 12:06 PM360 commentsview on HN

About an hour ago new versions have been deployed to PyPI.

I was just setting up a new project, and things behaved weirdly. My laptop ran out of RAM, it looked like a forkbomb was running.

I've investigated, and found that a base64 encoded blob has been added to proxy_server.py.

It writes and decodes another file which it then runs.

I'm in the process of reporting this upstream, but wanted to give everyone here a headsup.

It is also reported in this issue: https://github.com/BerriAI/litellm/issues/24512


Comments

fratellobigioyesterday at 1:39 PM

It's been quarantined on PyPI

mikert89yesterday at 1:30 PM

Wow this is in a lot of software

show 1 reply
dev_tools_labyesterday at 4:14 PM

Good reminder to pin dependency versions and verify checksums. SHA256 verification should be standard for any tool that makes network calls.

oncelearneryesterday at 1:39 PM

That's a bad supply-chain attack, many folks use litellm as main gateway

show 1 reply
6thbityesterday at 1:35 PM

Worth exploring safeguard for some: The automatic import can be suppressed using Python interpreter’s -S option.

This would also disable site import so not viable generically for everyone without testing.

show 1 reply
tom-blkyesterday at 2:37 PM

Stuff like is happening too much recently. Seems like the more fast paced areas of development would benefit from a paradigm shift

show 1 reply
nickspacekyesterday at 1:14 PM

teampcp taking credit?

https://github.com/krrishdholakia/blockchain/commit/556f2db3...

  - # blockchain
  - Implements a skeleton framework of how to mine using blockchain, including the consensus algorithms.
  + teampcp owns BerriAI
lightedmanyesterday at 5:20 PM

Write it yourself, fuzz/test it yourself, and build it yourself, or be forever subject to this exact issue.

This was taught in the 90s. Sad to see that lesson fading away.

tonymetyesterday at 10:10 PM

I recommend scanning all of your projects with osv-scanner in non-blocking mode

   # add any dependency file patterns
   osv-scanner -r .
as your projects mature, add osv-scanner as a blocking step to fail your installs before the code gets installed / executed.
saidnooneeveryesterday at 3:29 PM

just wanna state this can litterally happen to anyone within this messy package ecosystem. maintainer seems to be doing his best

if you have tips i am sure they are welcome. snark remarks are useless. dont be a sourpuss. if you know better, help the remediation effort.

Ayc0yesterday at 8:05 PM

Exactly what I needed, thanks.

sudormyesterday at 8:18 PM

are there any timestamps available when the malicious versions were published on pypi? I can't find anything but that now the last "good" version was published on march 22.

show 1 reply
0123456789ABCDEyesterday at 1:51 PM

airflow, dagster, dspy, unsloth.ai, polar

gkfasdfasdfyesterday at 1:33 PM

Someone needs to go to prison for this.

cpburns2009yesterday at 1:40 PM

LiteLLM is now in quarantine on PyPI [1]. Looks like burning a recovery token was worth it.

[1]: https://pypi.org/project/litellm/

Aeroiyesterday at 4:29 PM

whats up with the hundreds of bot replys on github to this?

johnhenryyesterday at 2:57 PM

I've been developing an alternative to LiteLLM. Javascript. No dependencies. https://github.com/johnhenry/ai.matey/

faxanalysisyesterday at 4:56 PM

This is secure bug impacting PyPi v1.82.7, v1.82.8. The idea of bracketing r-w-x mod package permissions for group id credential where litellm was installed.

otabdeveloper4yesterday at 1:45 PM

LiteLLM is the second worst software project known to man. (First is LangChain. Third is OpenClaw.)

I'm sensing a pattern here, hmm.

show 1 reply
kstenerudyesterday at 1:47 PM

We need real sandboxing. Out-of-process sandboxing, not in-process. The attacks are only going to get worse.

That's why I'm building https://github.com/kstenerud/yoloai

Imustaskforhelpyesterday at 1:30 PM

Our modern economy/software industry truly runs on egg-shells nowadays that engineers accounts are getting hacked to create a supply-chain attack all at the same time that threat actors are getting more advanced partially due to helps of LLM's.

First Trivy (which got compromised twice), now LiteLLM.

hmokiguessyesterday at 3:04 PM

what's up with everyone in the issue thread thanking it, is this an irony trend or is that a flex on account takeover from teampcp? this feels wild

rvzyesterday at 5:36 PM

What do we have here? Unaudited software completely compromised with a fake SOC 2 and ISO 27001 certification.

An actual infosec audit would have rigorously enforced basic security best practices in preventing this supply chain attack.

[0] https://news.ycombinator.com/item?id=47502754

somehnguyyesterday at 7:07 PM

Perhaps I'm missing something obvious - but what's up with the comments on the reported issue?

Hundreds of downvoted comments like "Worked like a charm, much appreciated.", "Thanks, that helped!", and "Great explanation, thanks for sharing."

show 1 reply
homanpyesterday at 3:02 PM

How were they compromised? Phishing?

bfeynmanyesterday at 12:57 PM

pretty horrifying. I only use it as lightweight wrapper and will most likely move away from it entirely. Not worth the risk

show 1 reply
claudiugyesterday at 4:04 PM

LiteLLM's SOC2 auditor was Delve :))

te_chrisyesterday at 2:15 PM

I reviewed the LiteLLM source a while back. Without wanting to be mean, it was a mess. Steered well clear.

show 1 reply
danielvaughnyesterday at 2:14 PM

I work with security researchers, so we've been on this since about an hour ago. One pain I've really come to feel is the complexity of Python environments. They've always been a pain, but in an incident like this, where you need to find whether an exact version of a package has ever been installed on your machine. All I can say is good luck.

The Python ecosystem provides too many nooks and crannies for malware to hide in.

TZubiriyesterday at 1:29 PM

Thank you for posting this, interesting.

I hope that everyone's course of action will be uninstalling this package permanently, and avoiding the installation of packages similar to this.

In order to reduce supply chain risk not only does a vendor (even if gratis and OS) need to be evaluated, but the advantage it provides.

Exposing yourself to supply chain risk for an HTTP server dependency is natural. But exposing yourself for is-odd, or whatever this is, is not worth it.

Remember that you are programmers and you can just program, you don't need a framework, you are already using the API of an LLM provider, don't put a hat on a hat, don't get killed for nothing.

And even if you weren't using this specific dependency, check your deps, you might have shit like this in your requirements.txt and was merely saved by chance.

An additional note is that the dev will probably post a post-mortem, what was learned, how it was fixed, maybe downplay the thing. Ignore that, the only reasonable step after this is closing a repo, but there's no incentive to do that.

show 2 replies
Blackthornyesterday at 2:12 PM

Edit: ignore this silliness, as it sidesteps the real problem. Leaving it here because we shouldn't remove our own stupidity.

It's pretty disappointing that safetensors has existed for multiple years now but people are still distributing pth files. Yes it requires more code to handle the loading and saving of models, but you'd think it would be worth it to avoid situations like this.

show 1 reply
cowpigyesterday at 6:00 PM

Tried running the compromised package inside Greywall, because theoretically it should mitigate everything but in practice it just forkbombs itself?

zhismeyesterday at 2:18 PM

Am I the only one having feeling that with LLM-era we have now bigger amount of malicious software lets say parsers/fetchers of credentials/ssh/private keys? And it is easier to produce them and then include in some 3rd party open-source software? Or it is just our attention gets focused on such things?

chillfoxyesterday at 1:33 PM

Now I feel lucky that I switched to just using OpenRouter a year ago because LiteLLM was incredible flaky and kept causing outages.

iwhalenyesterday at 1:05 PM

What is happening in this issue thread? Why are there 100+ satisfied slop comments?

show 4 replies
deep_nozyesterday at 1:10 PM

good i was too lazy to bump versions

show 1 reply
canberkhyesterday at 5:19 PM

helpful

skillflow_aiyesterday at 11:38 PM

[dead]

aplomb1026yesterday at 11:07 PM

[dead]

devnotes77yesterday at 7:03 PM

[dead]

pugchatyesterday at 4:29 PM

[dead]

jamiemallersyesterday at 3:03 PM

[dead]

qcautomationyesterday at 7:49 PM

[dead]

maxothexyesterday at 2:27 PM

[dead]

matrixgardyesterday at 12:50 PM

[dead]

🔗 View 13 more comments