103 comments

  • detente18
    6 hours ago
    LiteLLM maintainer here, this is still an evolving situation, but here's what we know so far:

    1. Looks like this originated from the trivvy used in our ci/cd - https://github.com/search?q=repo%3ABerriAI%2Flitellm%20trivy... https://ramimac.me/trivy-teampcp/#phase-09

    2. If you're on the proxy docker, you were not impacted. We pin our versions in the requirements.txt

    3. The package is in quarantine on pypi - this blocks all downloads.

    We are investigating the issue, and seeing how we can harden things. I'm sorry for this.

    - Krrish

    • detente18
      4 hours ago
      Update:

      - Impacted versions (v1.82.7, v1.82.8) have been deleted from PyPI - All maintainer accounts have been changed - All keys for github, docker, circle ci, pip have been deleted

      We are still scanning our project to see if there's any more gaps.

      If you're a security expert and want to help, email me - krrish@berri.ai

      • cosmicweather
        4 hours ago
        > All maintainer accounts have been changed

        What about the compromised accounts(as in your main account)? Are they completely unrecoverable?

      • MadsRC
        2 hours ago
        Dropped you a mail from mads.havmand@nansen.ai
        • ting0
          1 hour ago
          Was nansen compromised? What about your customers funds?
          • kvdveer
            1 hour ago
            > If you're a security expert and want to help, email me ...

            And

            > Dropped you a mail from [email]

            I don't think there is any indication of a compromise, they are just offering help.

    • harekrishnarai
      3 hours ago
      > it seems your personal account is also compromised. I just checked for the github search here https://github.com/search?q=%22teampcp+owns%22
    • daprichard
      42 minutes ago
      I got a report of high load on our dev server. Claude code found it minutes. amazing. Found it! The malware is in a .pth file that auto-executes on every Python

        startup. Let me identify exactly which file:                                      
      
                                                                                          
      
        Searched for 1 pattern, read 1 file (ctrl+o to expand)                            
      
                                                                                          
      
      ● Root cause confirmed: litellm_init.pth — a malicious .pth file that spawns the

        malware on every Python startup. Now let me find which package installed it:      
      
                                                                                          
      
        Searched for 1 pattern (ctrl+o to expand)                                         
      
                                                                                          
      
      ● Root cause identified: litellm==1.82.8 is the compromised package. It contains

        litellm_init.pth which spawns malware on every Python startup. The local .venv has
      
         litellm-1.75.3 (safe), but the container got litellm-1.82.8 as a transitive      
      
        dependency of crawl4ai==0.8.0.
    • rao-v
      56 minutes ago
      I put together a little script to search for and list installed litellm versions on my systems here: https://github.com/kinchahoy/uvpowered-tools/blob/main/inven...

      It's very much not production grade. It might miss sneaky ways to install litellm, but it does a decent job of scanning all my conda, .venv, uv and system enviornments without invoking a python interpreter or touching anything scary. Let me know if it misses something that matters.

      Obviously read it before running it etc.

    • redrove
      5 hours ago
      >1. Looks like this originated from the trivvy used in our ci/cd

      Were you not aware of this in the short time frame that it happened in? How come credentials were not rotated to mitigate the trivy compromise?

      • wheelerwj
        3 hours ago
        The latest trivy attack was announced just yesterday. If you go out to dinner or take a night off its totally plausible to have not seen it.
        • franktankbank
          3 hours ago
          [flagged]
          • embedding-shape
            3 hours ago
            Probably more "serious human" than "serious over-capitalist" or "seriously overworked". Good for them.
    • vintagedave
      3 hours ago
      This must be super stressful for you, but I do want to note your "I'm sorry for this." It's really human.

      It is so much better than, you know... "We regret any inconvenience and remain committed to recognising the importance of maintaining trust with our valued community and following the duration of the ongoing transient issue we will continue to drive alignment on a comprehensive remediation framework going forward."

      Kudos to you. Stressful times, but I hope it helps to know that people are reading this appreciating the response.

    • kingreflex
      2 hours ago
      we're using litellm via helm charts with tags main-v1.81.12-stable.2 and main-v1.80.8-stable.1 - assuming they're safe?

      also how are we sure that docker images aren't affected?

      • saltyoldman
        1 hour ago
        Docker deployments are more safe even if affected because there is a lower chance (but not zero) that you didn't mount all your credentials into the image. It would have access to LLM keys of course, but that's not really what the hacker is after. He's after private SSH keys.

        That being said this hack was a direct upload to PyPI in the last few days, so very unlikely those images are affected.

    • Imustaskforhelp
      3 hours ago
      I just want to share an update

      the developer has made a new github account and linked their new github account to hackernews and linked their hackernews about me to their github account to verify the github account being legitimate after my suggestion

      Worth following this thread as they mention that: "I will be updating this thread, as we have more to share." https://github.com/BerriAI/litellm/issues/24518

    • outside2344
      5 hours ago
      Is it just in 1.82.8 or are previous versions impacted?
      • Imustaskforhelp
        5 hours ago
        1.82.7 is also impacted if I remember correctly.
        • GrayShade
          4 hours ago
          1.82.7 doesn't have litellm_init.pth in the archive. You can download them from pypi to check.

          EDIT: no, it's compromised, see proxy/proxy_server.py.

          • cpburns2009
            4 hours ago
            1.82.7 has the payload in `litellm/proxy/proxy_server.py` which executes on import.
    • mrexcess
      2 hours ago
      You're making great software and I'm sorry this happened to you. Don't get discouraged, keep bringing the open source disruption!
    • Imustaskforhelp
      5 hours ago
      > - Krrish

      Was your account completely compromised? (Judging from the commit made by TeamPCP on your accounts)

      Are you in contacts with all the projects which use litellm downstream and if they are safe or not (I am assuming not)

      I am unable to understand how it compromised your account itself from the exploit at trivvy being used in CI/CD as well.

      • detente18
        4 hours ago
        It was the PYPI_PUBLISH token which was in our github project as an env var, that got sent to trivvy.

        We have deleted all our pypi publishing tokens.

        Our accounts had 2fa, so it's a bad token here.

        We're reviewing our accounts, to see how we can make it more secure (trusted publishing via jwt tokens, move to a different pypi account, etc.).

        • redrove
          4 hours ago
          How did PYPI_PUBLISH lead to a full GH account takeover?
        • mike_hearn
          3 hours ago
          Perhaps it's too obvious but ... just running the publish process locally, instead of from CI, would help. Especially if you publish from a dedicated user on a Mac where the system keychain is pretty secure.
          • staticassertion
            3 hours ago
            I'm not sure how. Their local system seems just as likely to get compromised through a `pip install` or whatever else.

            In CI they could easily have moved `trivy` to its own dedicated worker that had no access to the PYPI secret, which should be isolated to the publish command and only the publish command.

            • mike_hearn
              1 hour ago
              User isolation works, the keychain isolation works. On macOS tokens stored in the keychain can be made readable only by specific apps, not anything else. It does require a bit of infrastructure - ideally a Mac app that does the release - but nothing you can't vibe code quickly.
              • staticassertion
                1 hour ago
                That's true, but it seems far more complex than just moving trivy to a separate workerflow with no permissions and likely physical isolation between it and a credential. I'm pretty wary of the idea that malware couldn't just privesc - it's pretty trivial to obtain root on a user's laptop. Running as a separate, unprivileged user helps a ton, but again, I'm skeptical of this vs just using a github workflow.
          • tedivm
            2 hours ago
            This problem is solved by not having a token. Github and PyPI both support OIDC based workflows. Grant only the publish job access to OIDC endpoint, then the Trivy job has nothing it can steal.
      • redrove
        5 hours ago
        >I am unable to understand how it compromised your account itself from the exploit at trivvy being used in CI/CD as well.

        Token in CI could've been way too broad.

      • franktankbank
        5 hours ago
        He would have to state he didn't in fact make all those commits and close the issue.
    • ozozozd
      4 hours ago
      Kudos for this update.

      Write a detailed postmortem, share it publicly, continue taking responsibility, and you will come out of this having earned an immense amount respect.

    • bognition
      5 hours ago
      The decision to block all downloads is pretty disruptive, especially for people on pinned known good versions. Its breaking a bunch of my systems that are all launched with `uv run`
      • Shank
        5 hours ago
        > Its breaking a bunch of my systems that are all launched with `uv run`

        From a security standpoint, you would rather pull in a library that is compromised and run a credential stealer? It seems like this is the exact intended and best behavior.

      • tedivm
        5 hours ago
        You should be using build artifacts, not relying on `uv run` to install packages on the fly. Besides the massive security risk, it also means that you're dependent on a bunch of external infrastructure every time you launch. PyPI going down should not bring down your systems.
        • zbentley
          3 hours ago
          This is the right answer. Unfortunately, this is very rarely practiced.

          More strangely (to me), this is often addressed by adding loads of fallible/partial caching (in e.g. CICD or deployment infrastructure) for package managers rather than building and publishing temporary/per-user/per-feature ephemeral packages for dev/testing to an internal registry. Since the latter's usually less complex and more reliable, it's odd that it's so rarely practiced.

        • lanstin
          3 hours ago
          There are so many advantages to deployable artifacts, including audibility and fast roll-back. Also you can block so many risky endpoints from your compute outbound networks, which means even if you are compromised, it doesn't do the attacker any good if their C&C is not allow listed.
      • MeetingsBrowser
        5 hours ago
        Are you sure you are pinned to a “known good” version?

        No one initially knows how much is compromised

      • cpburns2009
        5 hours ago
        That's PyPI's behavior when they quarantine a package.
      • zbentley
        3 hours ago
        That's a good thing (disruptive "firebreak" to shut down any potential sources of breach while info's still being gathered). The solve for this is artifacts/container images/whatnot, as other commenters pointed out.

        That said, I'm sorry this is being downvoted: it's unhappily observing facts, not arguing for a different security response. I know that's toeing the rules line, but I think it's important to observe.

      • saidnooneever
        4 hours ago
        known good versions and which are those exactly??????
    • kleton
      4 hours ago
      There are hundreds of PRs fixing valid issues to your github repo seemingly in limbo for weeks. What is the maintainer state over there?
      • michh
        4 hours ago
        increasing the (social) pressure on maintainers to get PRs merged seems like the last thing you should be doing in light of preventing malicious code ending up in dependencies like this

        i'd much rather see a million open PRs than a single malicious PR sneak through due to lack of thorough review.

      • zparky
        4 hours ago
        Not really the time for that. There's also PRs being merged every hour of the day.
  • Nayjest
    0 minutes ago
    Use secure and minimalistic lm-proxy instead:

    https://github.com/Nayjest/lm-proxy

    ``` pip install lm-proxy ```

    Guys, sorry, as the author of a competing opensource product, I couldn’t resist

  • jFriedensreich
    6 hours ago
    We just can't trust dependencies and dev setups. I wanted to say "anymore" but we never could. Dev containers were never good enough, too clumsy and too little isolation. We need to start working in full sandboxes with defence in depth that have real guardrails and UIs like vm isolation + container primitives and allow lists, egress filters, seccomp, gvisor and more but with much better usability. Its the same requirements we have for agent runtimes, lets use this momentum to make our dev environments safer! In such an environment the container would crash, we see the violations, delete it and dont' have to worry about it. We should treat this as an everyday possibility not as an isolated security incident.
    • cedws
      5 hours ago
      This is the security shortcuts of the past 50 years coming back to bite us. Software has historically been a world where we all just trust each other. I think that’s coming to an end very soon. We need sandboxing for sure, but it’s much bigger than that. Entire security models need to be rethought.
      • klibertp
        3 hours ago
        The NIH syndrome becoming best practice (a commenter below already says they "vibe-coded replacements for many dependencies") would also save quite a few jobs, I suspect. Fun times.
        • ting0
          1 hour ago
          I've been doing that too. The downside is it's a lot of work for big replacements.
      • 1313ed01
        5 hours ago
        This assumes that we can get a locked down, secure, stable bedrock system and sandbox that basically never changes except for tiny security updates that can be carefully inspected by many independent parties.

        Which sounds great, but the way things work now tend to be the exact opposite of that, so there will be no trustable platform to run the untrusted code in. If the sandbox, or the operating system the sandbox runs in, will get breaking changes and force everyone to always be on a recent release (or worse, track main branch) then that will still be a huge supply chain risk in itself.

        • aftbit
          4 hours ago
          The secure boot "shim" is a project like this. Perhaps we need more core projects that can be simple and small enough to reach a "finished" state where they are unlikely to need future upgrades for any reason. Formal verification could help with this ... maybe.

          https://wiki.debian.org/SecureBoot#Shim

        • dotancohen
          5 hours ago

            > This assumes that we can get a locked down, secure, stable bedrock system and sandbox that basically never changes except for tiny security updates that can be carefully inspected by many independent parties.
          
          For the most part you can. Just version pin slightly-stale versions of dependencies, after ensuring there are no known exploits for that version. Avoid the latest updates whenever possible. And keep aware of security updates, and affected versions.

          Don't just update every time the dependency project updates. Update specifically for security issues, new features, and specific performance benefits. And even then avoid the latest version when possible.

          • 1313ed01
            5 hours ago
            Sure, and that is basically what sane people do now, but that only works until something needs a security patch that was not provided for the old version, and changing one dependency is likely to cascade so now I am open to supply chain attacks in many dependencies again (even if briefly).

            To really run code without trust would need something more like a microkernel that is the only thing in my system I have to trust, and everything running on top of that is forced to behave and isolated from everything else. Ideally a kernel so small and popular and rarely modified that it can be well tested and trusted.

            • dist-epoch
              4 hours ago
              Virtual machines are that - tiny surfaces to access the host system (block disk device, ...). Which is why virtual machine escape vulnerabilities are quite rare.
              • bilbo0s
                17 minutes ago
                I feel like in some cases we should be using virtual machines. Especially in domains where risk is non-trivial.

                How do you change developer and user habits though? It's not as easy as people think.

        • wang_li
          4 hours ago
          >Which sounds great, but the way things work now tend to be the exact opposite of that, so there will be no trustable platform to run the untrusted code in.

          This is the problem with software progressivism. Some things really should just be what they are, you fix bugs and security issues and you don't constantly add features. Instead everyone is trying to make everything have every feature. Constantly fiddling around in the guts of stuff and constantly adding new bugs and security problems.

      • georgestrakhov
        5 hours ago
        I've been thinking the same thing. And it's somewhat parallel to what happened to meditation vs. drugs. In the old world the dangerous insights required so many years of discipline that you could sort of trust that the person getting the insight would be ok. But then any idiot can get the insight by just eating some shrooms and oops, that's a problem. Mostly self-harm problem in that case. But the dynamic is somewhat similar to what's happening now with LLMs and coding.

        Software people could (mostly) trust each other's OSS contributions because we could trust the discipline it took in the first place. Not any more.

        • dec0dedab0de
          2 hours ago
          In the old world the dangerous insights required so many years of discipline that you could sort of trust that the person getting the insight would be ok. But then any idiot can get the insight by just eating some shrooms and oops, that's a problem.

          I would think humans have been using psychedelics since before we figured out meditation. Likely even before we were humans.

        • AlexCoventry
          2 hours ago
          Supply-chain attacks long pre-date effective AI agentic coding, FWIW.
        • KoftaBob
          2 hours ago
          What in the world are “the dangerous insights”?
      • ting0
        1 hour ago
        What we need is accountability and ties to real-world identity.

        If you're compromised, you're burned forever in the ledger. It's the only way a trust model can work.

        The threat of being forever tainted is enough to make people more cautious, and attackers will have no way to pull off attacks unless they steal identities of powerful nodes.

        Like, it shouldn't be a thing that some large open-source project has some 4th layer nested dependency made by some anonymous developer with 10 stars on Github.

        If instead, the dependency chain had to be tied to real verified actors, you know there's something at stake for them to be malicious. It makes attacks much less likely. There's repercussions, reputation damage, etc.

        • post-it
          38 minutes ago
          > The threat of being forever tainted is enough to make people more cautious

          No it's not. The blame game was very popular in the Eastern Block and it resulted in a stagnant society where lots of things went wrong anyway. For instance, Chernobyl.

        • MetaWhirledPeas
          1 hour ago
          > real-world identity

          This bit sounds like dystopian governance, antithetical to most open source philosophies.

          • 2OEH8eoCRo0
            1 hour ago
            Would you drive on bridges or ride in elevators "inspected" by anons? Why are our standards for digital infrastructure and software "engineering" so low?

            I don't blame the anons but the people blindly pulling in anon dependencies. The anons don't owe us anything.

            • MetaWhirledPeas
              1 hour ago
              This option is available already in the form of closed-source proprietary software.

              If someone wants a package manager where all projects mandate verifiable ID that's fine, but I don't see that getting many contributors. And I also don't see that stopping people using fraudulent IDs.

    • kalib_tweli
      6 hours ago
      Would value your opinion on my project to isolate creds from the container:

      https://github.com/calebfaruki/tightbeam https://github.com/calebfaruki/airlock

      This is literally the thing I'm trying to protect against.

      • jFriedensreich
        3 hours ago
        I would split the agent loop totally from the main project of tightbeam, no one wants yet another new agent harness we need to focus on the operational problems. Airlock seems interesting in theory but its really hard to believe this could capture every single behaviour of the native local binaries, we need the native tools with native behaviour otherwise might as well use something like MCP. I would bet more on a git protocol proxy and native solutions for each of these.
    • binsquare
      5 hours ago
      So... I'm working on an open source technology to make a literal virtual machine shippable i.e. freezing everything inside it, isolated due to vm/hypervisor for sandboxing, with support for containers too since it's a real linux vm.

      The problems you mentioned resonated a lot with me and why I'm building it, any interest in working to solve that together?: https://github.com/smol-machines/smolvm

      • jFriedensreich
        5 hours ago
        Thanks for the pointer! Love the premise project. Just a few notes:

        - a security focused project should NOT default to train people installing by piping to bash. If i try previewing the install script in the browser it forces download instead of showing as plain text. The first thing i see is an argument

        # --prefix DIR Install to DIR (default: ~/.smolvm)

        that later in the script is rm -rf deleting a lib folder. So if i accidentally pick a folder with ANY lib folder this will be deleted.

        - Im not sure what the comparison to colima with krunkit machines is except you don't use vm images but how this works or how it is better is not 100% clear

        - Just a minor thing but people don't have much attention and i just saw aws and fly.io in the description and nearly closed the project. it needs to be simpler to see this is a local sandbox with libkrun NOT a wrapper for a remote sandbox like so many of the projects out there.

        Will try reaching you on some channel, would love to collaborate especially on devX, i would be very interested in something more reliable and bit more lightweight in placce of colima when libkrun can fully replace vz

        • binsquare
          4 hours ago
          Love this feedback, agree with you completely on all of it - I'll be making those changes.

          1. In comparison with colima with krunkit, I ship smolvm with custom built kernel + rootfs, with a focus on the virtual machine as opposed to running containers (though I enable running containers inside it).

          The customizations are also opensource here: https://github.com/smol-machines/libkrunfw

          2. Good call on that description!

          I've reached out to you on linkedin

        • dist-epoch
          4 hours ago
          What is the alternative to bash piping? If you don't trust the project install script, why would you trust the project itself? You can put malware in either.
          • jFriedensreich
            2 hours ago
            That assumes you even need an install script. 90% of install scripts just check the platform and make the binary executable and put it in the right place. Just give me links to a github release page with immutable releases enabled and pure binaries. I download the binary but it in a temporary folder, run it with a seatbelt profile that logs what it does. Binaries should "just run" and at most access one folder in a place they show you and that is configurable! Fuck installers.
          • wang_li
            4 hours ago
            It turns out that it's possible for the server to detect whether it is running via "| bash" or if it's just being downloaded. Inspecting it via download and then running that specific download is safer than sending it directly to bash, even if you download it and inspect it before redownloading it and piping it to a shell.
            • dist-epoch
              3 hours ago
              The server can also put malware in the .tar.gz. Are you really checking all the files in there, even the binaries? If you don't what's the point of checking only the install script?
      • Bengalilol
        5 hours ago
        Probably on the side of your project, but did you try SmolBSD? <https://smolbsd.org> It's a meta-OS for microVMs that boots in 10–15 ms.

        It can be dedicated to a single service (or a full OS), runs a real BSD kernel, and provides strong isolation.

        Overall, it fits into the "VM is the new container" vision.

        Disclaimer: I'm following iMil through his twitch streams (the developer of smolBSD and a contributor to NetBSD) and I truly love what he his doing. I haven't actually used smolBSD in production myself since I don't have a need for it (but I participated in his live streams by installing and running his previews), and my answer might be somewhat off-topic.

        More here <https://hn.algolia.com/?q=smolbsd>

        • binsquare
          4 hours ago
          First time hearing about it, thanks for sharing!

          At a glance, it's a matter of compatibility, most software has first class support for linux. But very interesting work and I'm going to follow it closely

      • vladvasiliu
        5 hours ago
        What would the advantage of this be compared to using something like a Firecracker backend for containerd?
        • binsquare
          4 hours ago
          Run locally on macs, much easier to install/use, and designed to be "portable" meaning you can package a VM to preserve statefulness and run it somewhere else.

          worked in AWS and specifically with firecracker in the container space for 4 years - we had a very long onboarding doc to dev on firecracker for containers... So I made sure to focus on ease of use here.

        • jFriedensreich
          5 hours ago
          firecracker does not run on macos and has no GPU support
      • fsflover
        2 hours ago
        It looks like you may be interested in Qubes OS, https://qubes-os.org.
    • poemxo
      2 hours ago
      "Anymore" is right though. This should be a call to change the global mindset regarding dependencies. We have to realize that the "good ol days" are behind us in order to take action.

      Otherwise people will naysay and detract from the cause. "It worked before" they will say. "Why don't we do it like before?"

      DISA STIG already forbids use of the EPEL for Red Hat Enterprise Linux. Enterprise software install instructions are littered with commands to turn off gpgcheck and install rpm's from sourceforge. The times are changing and we need cryptographically verifiable guarantees of safety!

    • Aurornis
      1 hour ago
      > Dev containers were never good enough, too clumsy and too little isolation.

      I haven't kept up with the recent exploits, so a side question: Have any of the recent supply chain attacks or related exploits included any escapes from basic dev containers?

    • amelius
      5 hours ago
      We need programming languages where every imported module is in its own sandbox by default.
      • mike_hearn
        3 hours ago
        Java had that from v1.2 in the 1990s. It got pulled out because nobody used it. The problem of how to make this usable by developers is very hard, although maybe LLMs change the equation.
      • jerf
        4 hours ago
        Now is probably a pretty good time to start a capabilities-based language if someone is able to do that. I wish I had the time.
      • jFriedensreich
        5 hours ago
        We have one where thats possible: workerd (apache 2.0) no new language needed just a new runtime
        • amelius
          4 hours ago
          I mean, the sandboxing aspect of a language is just one thing.

          We should have sandboxing in Rust, Python, and every language in between.

      • saidnooneever
        4 hours ago
        just sandbox the interpreter (in this case), package manager and binaries.

        u can run in chroot jail and it wouldnt have accessed ssh keys outside of the jail...

        theres many more similar technologies aleady existing, for decades.

        doing it on a per language basis is not ideal. any new language would have to reinvent the wheel.

        better to do it at system level. with the already existing tooling.

        openbsd has plege/unveil, linux chroot, namespaces, cgroups, freebsd capsicum or w/e. theres many of these things.

        (i am not sure how well they play within these scenarios, but just triggering on the sandboxing comment. theres plenty of ways to do it as far as i can tell...)

        • amelius
          4 hours ago
          What if I wanted to write a program that uses untrusted libraries, but also does some very security sensitive stuff? You are probably going to suggest splitting the program into microservices. But that has a lot of problems and makes things slow.

          The problem is that programs can be entire systems, so "doing it at the system level" still means that you'd have to build boundaries inside a program.

          • saidnooneever
            4 hours ago
            you can do multi process things. or drop privs when using untrusted things.

            you can use OS apis to isolate the thing u want to use just fine..

            and yes, if you mix privilege levels in a program by design then u will have to design your program for that.

            this is simple logic.

            a programming language can not decide for you who and what you trust.

            • amelius
              3 hours ago
              > you can use OS apis to isolate the thing u want to use just fine..

              For the sake of the argument, what if I wanted to isolate numpy from scipy?

              Would you run numpy in a separate process from scipy? How would you share data between them?

              Yes, you __can__ do all of that without programming language support. However, language support can make it much easier.

      • staticassertion
        3 hours ago
        In frontend-land you can sort of do this by loading dependencies in iframe sandboxes. In backend, ur fucked.
    • fulafel
      2 hours ago
      > In such an environment the container would crash, we see the violations, delete it and dont' have to worry about it.

      This is the interesting part. What kind of UI or other mechanisms would help here? There's no silver bullet for detecting and crashing on "something bad". The adversary can test against your sandbox as well.

    • miraculixx
      1 hour ago
      I agree in general, but how are you ever upgrading any of that? Could be a "sleeper compromise" that only activates sometime in the future. Open problem.
      • jFriedensreich
        1 hour ago
        A sleeper compromise that cannot execute can still not reach its goal. Generally speaking outdated dependencies without known compromise in a sandbox are still better than the latest deps with or without sandbox.
    • Andrei_dev
      1 hour ago
      Sandboxes yes, but who even added the dependency? Half the projects I see have requirements.txt written by Copilot. AI says "add litellm", dev clicks accept, nobody even pins versions.

      Then we talk about containment like anyone actually looked at that dep list.

    • uyzstvqs
      5 hours ago
      That's no solution. If you can't trust and/or verify dependencies, and they are malicious, then you have bigger problems than what a sandbox will protect against. Even if it's sandboxed and your host machine is safe, you're presumably still going to use that malicious code in production.
      • staticassertion
        3 hours ago
        That's exactly what a sandbox is designed for. I think you're overly constraining your view of what sort of sandboxing can exist. You can, for example, sandbox code such that it can't do anything but read/write to a specific segment of memory.
      • nazcan
        5 hours ago
        I'm supportive of going further - like restricting what a library is able to do. e.g. if you are using some library to compute a hash, it should not make network calls. Without sub-processes, it would require OS support.
        • fn-mote
          4 hours ago
          Which exists: pledge in OpenBSD.

          Making this work on a per-library level … seems a lot harder. The cost for being very paranoid is a lot of processes right now.

          • lanstin
            3 hours ago
            It's a language/compiler/function call stack feature, not existing as far as I know, but it would be awesome - the caller of a function would specify what resources/syscalls could be made, and anything down the chain would be thusly restricted. The library could try to do its phone home stats and it would fail. Couldn't be C or a C type language runtime, or anything that can call to assembly of course. @compute_only decorator. Maybe could be implemented as a sys-call for a thread - thread_capability_remove(F_NETWORK + F_DISK)? Wouldn't be able to schedule any work on any thread in that case, but Go could have pools of threads for coroutines with varying capabilities. Something to put the developer back in charge of the mountain of dependencies we are all forced to manage now.
      • exyi
        5 hours ago
        Except that LiteLLM probably got pwned because they used Trivy in CI. If Trivy ran in a proper sandbox, the compromised job could not publish a compromised package.

        (Yes, they should better configure which CI job has which permissions, but this should be the default or it won't always happen)

    • udave
      4 hours ago
      strongly agree. we keep giving away trust to other entities in order to make our jobs easier. trusting maintainers is still better than trusting a clanker but still risky. We need a sandboxed environment where we can build our software without having to worry about these unreliable factors.

      On a personal note, I have been developing and talking to a clanker ( runs inside ) to get my day to day work done. I can have multiple instances of my project using worktrees, have them share some common dependencies and monitor all of them in one place. I plan to opensource this framework soon.

    • dotancohen
      5 hours ago

        > We just can't trust dependencies and dev setups.
      
      
      In one of my vibe coded personal projects (Python and Rust project) I'm actually getting rid of most dependencies and vibe coding replacements that do just what I need. I think that we'll see far fewer dependencies in future projects.

      Also, I typically only update dependencies when either an exploit is known in the current version or I need a feature present in a later version - and even then not to the absolute latest version if possible. I do this for all my projects under the many eyes principal. Finding exploits takes time, new updates are riskier than slightly-stale versions.

      Though, if I'm filing a bug with a project, I do test and file against the latest version.

      • adw
        5 hours ago
        > In one of my vibe coded personal projects (Python and Rust project) I'm actually getting rid of most dependencies and vibe coding replacements that do just what I need. I think that we'll see far fewer dependencies in future projects.

        No free lunch. LLMs are capable of writing exploitable code and you don’t get notifications (in the eg Dependabot sense, though it has its own problems) without audits.

        • dotancohen
          2 hours ago
          My vibe coded personal projects don't have the source code available for attackers to target specifically.
          • nimih
            1 hour ago
            It might surprise you to learn that a large number of software exploits are written without the attacker having direct access to the program's source code. In fact, shocking as it may seem today, huge numbers of computers running the Windows operating system and Internet Explorer were compromised without the attackers ever having access to the source code of either.
          • heavyset_go
            1 hour ago
            You don't need open source access to be exploitable or exploited
    • wswin
      5 hours ago
      Containers prevent this kind of info stealing greatly, only explicitly provided creds would be leaked.
      • jFriedensreich
        5 hours ago
        Containers can mean many things, if you mean plain docker default configured containers then no, they are a packaging mechanism not safe environment by themselves.
        • wswin
          5 hours ago
          They don't have access to the host filesystem nor environment variables and this attack wouldn't work.
          • jFriedensreich
            3 hours ago
            Just because this attack example did not contain container escape exploits does not mean this is safe. Its better than nothing but nothing that will save us.
    • dist-epoch
      4 hours ago
      This stuff already exists - mobile phone sandboxed applications with intents (allow Pictures access, ...)

      But mention that on HN and watch getting downvoted into oblivion: the war against general computation, walled gardens, locked down against device owners...

      • jFriedensreich
        3 hours ago
        You are not being downvoted because the core premise is wrong but because your framing as a choice between being locked out of general purpose computing vs security is repeating the brainwashing companies like apple and meta do to justify their rent-seeking locking out out of competitors and user agency. We have all the tools to build safe systems that don't require up front manifest declaration and app store review by the lord but give tools for control, dials and visibility to the users themselves in the moment. And yes, many of these UIs might look like intent sheets. The difference is who ultimately controls how these Interfaces look and behave.
    • kkralev
      4 hours ago
      [dead]
  • ramimac
    6 hours ago
    This is tied to the TeamPCP activity over the last few weeks. I've been responding, and keeping an up to date timeline. I hope it might help folks catch up and contextualize this incident:

    https://ramimac.me/trivy-teampcp/#phase-09

    • itintheory
      1 hour ago
      Thanks for putting this together. I've been seeing the name TeamPCP pop up all over, but hadn't seen everything in one place.
    • miraculixx
      1 hour ago
      This is interesting. How do you keep this up to date so quickly?
      • ramimac
        1 hour ago
        Blood, sweat, and tears.

        The investment compounds! I have enough context to quickly vet incoming information, then it's trivial to update a static site with a new blurb

  • hiciu
    6 hours ago
    Besides main issue here, and the owners account being possibly compromised as well, there's like 170+ low quality spam comments in there.

    I would expect better spam detection system from GitHub. This is hardly acceptable.

    • snailmailman
      1 hour ago
      The same thing occurred on the trivy repo a few days ago. A GitHub discussion about the hack was closed and 700+ spam comments were posted.

      I scrolled through and clicked a few profiles. While many might be spam accounts or low-activity accounts, some appeared to be actual GitHub users with a history of contributions.

      I’m curious how so many accounts got compromised. Are those past hacks, or is this credential steeling hack very widespread?

      Are the trivy and litellm hacks just 2 high profile repos out of a much more widespread “infect as many devs as possible, someone might control a valuable GitHub repository” hack? I’m concerned that this is only the start of many supply chain issues.

      Edit: Looking through and several of the accounts have a recent commit "Update workflow configuration" where they are placing a credential stealer into a CI workflow. The commits are all back in february.

    • orf
      6 hours ago
      i'm guessing it's accounts they have compromised with the stealer.
      • ebonnafoux
        5 hours ago
        They repeat only six sentences during 100+ comments:

        Worked like a charm, much appreciated.

        This was the answer I was looking for.

        Thanks, that helped!

        Thanks for the tip!

        Great explanation, thanks for sharing.

        This was the answer I was looking for.

        • dec0dedab0de
          5 hours ago
          Over the last ~15 years I have been shocked by the amount of spam on social networks that could have been caught with a Bayesian filter. Or in this case, a fairly simple regex.
          • Imustaskforhelp
            5 hours ago
            Well, large companies/corporations don't care about Spam because they actually benefit from spam in a way as it boosts their engagement ratio

            It just doesn't have to be spammed enough that advertisers leave the platform and I think that they sort of succeed in doing so.

            Think about it, if Facebook shows you AI slop ragebait or any rage-inducing comment from multiple bots designed to farm attention/for malicious purposes in general, and you fall for it and show engagement to it on which it can show you ads, do you think it has incentive to take a stance against such form of spam

            • dec0dedab0de
              5 hours ago
              Yeah, I almost included that part in my comment, but it still sucks.
    • ratdoctor
      1 hour ago
      Or they're just bots. This repository has 40k+ stars somehow.
  • eoskx
    4 hours ago
    Also, not surprising that LiteLLM's SOC2 auditor was Delve. The story writes itself.
    • saganus
      3 hours ago
      Would a proper SOC2 audit have prevented this?

      I've been through SOC2 certifications in a few jobs and I'm not sure it makes you bullet proof, although maybe there's something I'm missing?

      • stevekemp
        2 hours ago
        Just so long as it was a proper SOC2 audit, and not a copy-pasted job:

        https://news.ycombinator.com/item?id=47481729

      • shados
        2 hours ago
        SOC2 is just "the process we say we have, is what we do in practice". The process can be almost anything. Some auditors will push on stuff as "required", but they're often wrong.

        But all it means in the end is you can read up on how a company works and have some level of trust that they're not lying (too much).

        It makes absolutely zero guarantees about security practices, unless the documented process make these guarantees.

        • saganus
          2 hours ago
          Yeah, that was my understanding as well, so I fail to see how a proper SOC2 would have prevented this.

          I mean ideally a proper SOC2 would mean there are processes in place to reduce the likelihood of this happening, and then also processes to recover from if it did ended up happening.

          But the end result could've been essentially the same.

          • kyyol
            2 hours ago
            It wouldn't have. lol.
  • rdevilla
    6 hours ago
    It will only take one agent-led compromise to get some Claude-authored underhanded C into llvm or linux or something and then we will all finally need to reflect on trusting trust at last and forevermore.
    • vlovich123
      6 hours ago
      Reflect in what way? The primary focus of that talk is that it’s possible to infect the binary of a compiler in a way that source analysis won’t reveal and the binary self replicates the vulnerability into other binaries it generates. Thankfully that particular problem was “solved” a while back [1] even if not yet implemented widely.

      However, the broader idea of supply chain attacks remains challenging and AI doesn’t really matter in terms of how you should treat it. For example, the xz-utils back door in the build system to attack OpenSSH on many popular distros that patched it to depend on systemd predates AI and that’s just the attack we know about because it was caught. Maybe AI helps with scale of such attacks but I haven’t heard anyone propose any kind of solution that would actually improve reliability and robustness of everything.

      [1] Fully Countering Trusting Trust through Diverse Double-Compiling https://arxiv.org/abs/1004.5534

      • cozzyd
        4 hours ago
        I believe the issue is if an exploit is somehow injected into AI training data such that the AI unwittingly produces it and the human who requested the code doesn't even know.
        • vlovich123
          4 hours ago
          That’s a separate issue and specifically not what OP was describing. Also highly unlikely in practice unless you use a random LLM - the major LLM providers already have to deal with such things and they have decent techniques to deal with this problem afaik.
    • ting0
      1 hour ago
      Stop scaring me.

      You're right though. There's been talks of a big global hack attack for a while now.

      Nothing is safe anymore. Keep everything private airgapped is the only way forward. But most of our private and personal data is in the cloud, and we have no control over it or the backups that these companies keep.

      While LLMs unlock the opportunity to self-host and self-create your infrastructure, it also unleashes the world of pain that is coming our way.

    • cozzyd
      6 hours ago
      The only way to be safe is to constantly change internal APIs so that LLMs are useless at kernel code
      • thr0w4w4y1337
        6 hours ago
        To slightly rephrase a citation from Demobbed (2000) [1]:

        The kernel is not just open source, it's a very fast-moving codebase. That's how we win all wars against AI-authored exploits. While the LLM trains on our internal APIs, we change the APIs — by hand. When the agent finally submits its pull request, it gets lost in unfamiliar header files and falls into a state of complete non-compilability. That is the point. That is our strategy.

        1 - https://en.wikipedia.org/wiki/Demobbed_(2000_film)

    • Imustaskforhelp
      6 hours ago
      If that would happen, The worry I would have is of all the sensitive Government servers from all over the world which might be then exploited and the amount of damage which can be caused silently by such a threat actor or something like AWS/GCP/these massive hyperscalers which are also used by the governments around the globe at times.

      The possibilities within a good threat could be catastrophic if we assume so, and if we assume nation-states to be interested in sponsoring hacking attacks (which many nations already do) to attack enemy nations/gain leverage. We are looking at damage within Trillions at that point.

      But I would assume that Linux might be safe for now, it might be the most looked at code and its definitely something safe.

      LLVM might be a bit more interesting as it might go a little unnoticed but hopefully people who are working at LLVM are well funded/have enough funding to take a look at everything carefully to not have such a slip up.

    • MuteXR
      6 hours ago
      You know that people can already write backdoored code, right?
      • dec0dedab0de
        5 hours ago
        Yeah, and they can write code with vulnerabilities by accident. But this is a new class of problem, where a known trusted contributor can accidentally allow a vulnerability that was added on purpose by the tooling.
      • ipython
        6 hours ago
        But now you have compromise _at scale_. Before poor plebs like us had to artisinally craft every back door. Now we have a technology to automate that mundane exploitation process! Win!
        • MuteXR
          6 hours ago
          You still have a human who actually ends up reviewing the code, though. Now if the review was AI powered... (glances at openclaw)
  • intothemild
    6 hours ago
    I just installed Harbor, and it instantly pegged my cpu.. i was lucky to see my processes before the system hard locked.

    Basically it forkbombed `grep -r rpcuser\rpcpassword` processes trying to find cryptowallets or something. I saw that they spawned from harness, and killed it.

    Got lucky, no backdoor installed here from what i could make out of the binary

    • abhikul0
      5 hours ago
      Same experience with browser-use, it installs litellm as a dependency. Rebooted mac as nothing was responding; luckily only github and huggingface tokens were saved in .git-credentials and have invalidated them. This was inside a conda env, should I reinstall my os for any potential backdoors?
    • swyx
      3 hours ago
      > i was lucky to see my processes before the system hard locked.

      how do you do that? have Activity Monitor up at all times?

      • krackers
        1 hour ago
        Probably iStat menus or something similar
    • hmokiguess
      6 hours ago
      What is Harness?
      • intothemild
        5 hours ago
        Sorry i mean Harbor.. was running terminal bench
  • ilusion
    8 minutes ago
    Does this mean opencode (and other such agent harnesses that auto update) might also be compromised?
  • ajoy
    19 minutes ago
    Reminded me of a similar story at openSSH, wonderfully documented in a "Veritasium" episode, which was just fascinating to watch/listen.

    https://www.youtube.com/watch?v=aoag03mSuXQ

  • cedws
    5 hours ago
    This looks like the same TeamPCP that compromised Trivy. Notice how the issue is full of bot replies. It was the same in Trivy’s case.

    This threat actor seems to be very quickly capitalising on stolen credentials, wouldn’t be surprised if they’re leveraging LLMs to do the bulk of the work.

  • shay_ker
    6 hours ago
    A general question - how do frontier AI companies handle scenarios like this in their training data? If they train their models naively, then training data injection seems very possible and could make models silently pwn people.

    Do the labs label code versions with an associated CVE to label them as compromised (telling the model what NOT to do)? Do they do adversarial RL environments to teach what's good/bad? I'm very curious since it's inevitable some pwned code ends up as training data no matter what.

    • tomaskafka
      6 hours ago
      Everyone’s (well, except Anthropic, they seem to have preserved a bit of taste) approach is the more data the better, so the databases of stolen content (erm, models) are memorizing crap.
    • datadrivenangel
      6 hours ago
      This was a compromise of the library owners github acccounts apparently, so this is not a related scenario to dangerous code in the training data.

      I assume most labs don't do anything to deal with this, and just hope that it gets trained out because better code should be better rewarded in theory?

    • Havoc
      2 hours ago
      By betting that it dilutes away and not worrying about it too much. Bit like dropping radioactive barrels into the deep ocean.
      • ting0
        1 hour ago
        Yeah, and that won't hold up for long. Just wait until some well resourced attacker replicates their exploit into tens of thousands of sources it knows will be scraped and included in the training set to bias the model to produce their vulnerable code. Only a matter of time.
    • Imustaskforhelp
      6 hours ago
      I am pretty sure that such measures aren't taken by AI companies, though I may be wrong.
      • alansaber
        6 hours ago
        The API/online model inference definitely runs through some kind of edge safeguarding models which could do this.
  • ting0
    1 hour ago
    I've been waiting for something like this to happen. It's just too easy to pull off. I've been hard-pinning all of my versions of dependencies and using older versions in any new projects I set up for a little while, because they've generally at least been around long enough to vet. But even that has its own set of risks (for example, what if I accidently pin a vulnerable version). Either that, or I fork everything, including all the deps, run LLMs over the codebase to vet everything.

    Even still though, we can't really trust any open-source software any more that has third party dependencies, because the chains can be so complex and long it's impossible to vet everything.

    It's just too easy to spam out open-source software now, which also means it's too easy to create thousands of infected repos with sophisticated and clever supply chain attacks planted deeply inside them. Ones that can be surfaced at any time, too. LLMs have compounded this risk 100x.

    • MarsIronPI
      53 minutes ago
      > Even still though, we can't really trust any open-source software any more that has third party dependencies, because the chains can be so complex and long it's impossible to vet everything.

      This is why software written in Rust scares me. Almost all Rust programs have such deep dependency trees that you really can't vet them all. The Rust and Node ecosystems are the worst for this, but Python isn't much better. IMO it's language-specific package managers that end up causing this problem because they make it too easy to bring in dependencies. In languages like C or C++ that traditionally have used system package managers the cost of adding a dependency is high enough that you really avoid dependencies unless they're truly necessary.

  • bratao
    7 hours ago
    Look like the Founder and CTO account has been compromised. https://github.com/krrishdholakia
    • jadamson
      6 hours ago
      Most his recent commits are small edits claiming responsibility on behalf of "teampcp", which was the group behind the recent Trivy compromise:

      https://news.ycombinator.com/item?id=47475888

      • soco
        6 hours ago
        I was just wondering why the Trivy compromise hit only npm packages, thinking that bigger stuff should appear sooner or later. Here we go...
    • franktankbank
      6 hours ago
      Or his company is trash and hes moved onto plain old theft.
  • santiago-pl
    41 minutes ago
    It looks like Trivy was compromised at least five days ago. https://www.wiz.io/blog/trivy-compromised-teampcp-supply-cha...
  • f311a
    5 hours ago
    Their previous release would be easily caught by static analysis. PTH is a novel technique.

    Run all your new dependencies through static analysis and don't install the latest versions.

    I implemented static analysis for Python that detects close to 90% of such injections.

    https://github.com/rushter/hexora

    • ting0
      1 hour ago
      And easily bypassed by an attacker who knows about your static analysis tool who can iterate on their exploit until it no longer gets flagged.
    • samsk
      5 hours ago
      Interesting tool, will definitely try - just curious, is there a tool (hexora checker) that ensures that hexora itself and its dependencies are not compromised ? And of course if there is one, I'll need another one for the hexora checker....
  • syllogism
    4 hours ago
    Maintainers need to keep a wall between the package publishing and public repos. Currently what people are doing is configuring the public repo as a Trusted Publisher directly. This means you can trigger the package publication from the repo itself, and the public repo is a huge surface area.

    Configure the CI to make a release with the artefacts attached. Then have an entirely private repo that can't be triggered automatically as the publisher. The publisher repo fetches the artefacts and does the pypi/npm/whatever release.

    • anderskaseorg
      2 hours ago
      The point of trusted publishing is supposed to be that the public can verifiably audit the exact source from which the published artifacts were generated. Breaking that chain via a private repo is a step backwards.

      https://docs.npmjs.com/generating-provenance-statements

      https://packaging.python.org/en/latest/specifications/index-...

    • saidnooneever
      4 hours ago
      this kind of compromise is why a lot of orgs have internal mirrors of repos or package sources so they can stay behind few versions to avoid latest and compromise. seen it with internal pip repos, apt repos etc.

      some will even audit each package in there (kind crap job but it works fairly well as mitigation)

      • syllogism
        4 hours ago
        Just keeping a lockfile and updating it weekly works fine for that too yeah
  • Ayc0
    6 minutes ago
    Exactly what I needed, thanks.
  • nickvec
    6 hours ago
    Looks like all of the LiteLLM CEO’s public repos have been updated with the description “teampcp owns BerriAI” https://github.com/krrishdholakia
  • tom_alexander
    6 hours ago
    Only tangentially related: Is there some joke/meme I'm not aware of? The github comment thread is flooded with identical comments like "Thanks, that helped!", "Thanks for the tip!", and "This was the answer I was looking for."

    Since they all seem positive, it doesn't seem like an attack but I thought the general etiquette for github issues was to use the emoji reactions to show support so the comment thread only contains substantive comments.

    • incognito124
      6 hours ago
      In the thread:

      > It also seems that attacker is trying to stifle the discussion by spamming this with hundreds of comments. I recommend talking on hackernews if that might be the case.

    • nickvec
      6 hours ago
      Ton of compromised accounts spamming the GH thread to prevent any substantive conversation from being had.
      • tom_alexander
        5 hours ago
        Oh wow. That's a lot of compromised accounts. Guess I was wrong about it not being an attack.
    • vultour
      6 hours ago
      These have been popping up on all the TeamPCP compromises lately
    • jbkkd
      6 hours ago
      Those are all bots commenting, and now exposing themselves as such.
    • Imustaskforhelp
      6 hours ago
      Bots to flood the discussion to prevent any actual conversation.
  • eoskx
    6 hours ago
    This is bad, especially from a downstream dependency perspective. DSPy and CrewAI also import LiteLLM, so you could not be using LiteLLM as a gateway, but still importing it via those libraries for agents, etc.
    • nickvec
      6 hours ago
      Wow, the postmortem for this is going to be brutal. I wonder just how many people/orgs have been affected.
      • eoskx
        6 hours ago
        Yep, I think the worst impact is going to be from libraries that were using LiteLLM as just an upstream LLM provider library vs for a model gateway. Hopefully, CrewAI and DSPy can get on top of it soon.
    • benatkin
      5 hours ago
      I'm surprised to see nanobot uses LiteLLM: https://github.com/HKUDS/nanobot

      LiteLLM wouldn't be my top choice, because it installs a lot of extra stuff. https://news.ycombinator.com/item?id=43646438 But it's quite popular.

      • flux3125
        5 hours ago
        I completely removed nanobot after I found that. Luckily, I only used it a few times and inside a docker container. litellm 1.82.6 was the latest version I could find installed, not sure if it was affected.
  • santiagobasulto
    5 hours ago
    I blogged about this last year[0]...

    > ### Software Supply Chain is a Pain in the A*

    > On top of that, the room for vulnerabilities and supply chain attacks has increased dramatically

    AI Is not about fancy models, is about plain old Software Engineering. I strongly advised our team of "not-so-senior" devs to not use LiteLLM or LangChain or anything like that and just stick to `requests.post('...')".

    [0] https://sb.thoughts.ar/posts/2025/12/03/ai-is-all-about-soft...

    • eoskx
      5 hours ago
      Valid, but for all the crap that LangChain gets it at least has its own layer for upstream LLM provider calls, which means it isn't affected by this supply chain compromise (unless you're using the optional langchain-litellm package). DSPy uses LiteLLM as its primary way to call OpenAI, etc. and CrewAI imports it, too, but I believe it prefers the vendor libraries directly before it falls back to LiteLLM.
  • sschueller
    6 hours ago
    Does anyone know a good alternate project that works similarly (share multipple LLMs across a set of users)? LiteLLM has been getting worse and trying to get me to upgrade to a paid version. I also had issues with creating tokens for other users etc.
    • treefarmer
      2 hours ago
      If you're talking about their proxy offering, I had this exact same issue and switched to Portkey. I just use their free plan and don't care about the logs (I log separately on my own). It's way faster (probably cause their code isn't garbage like the LiteLLM code - they had a 5K+ line Python file with all their important code in it the last time I checked).
    • sschueller
      6 hours ago
      I just found https://github.com/jasmedia/InferXgate which looks interesting although quite new and not supporting so many providers.
    • redrove
      6 hours ago
      Bifrost is the only real alternative I'm aware of https://github.com/maximhq/bifrost
      • sschueller
        5 hours ago
        Virtual Keys is an Enterprise feature. I am not going to pay for something like this in order to provide my family access to all my models. I can do without cost control (although it would be nice) but I need for users to be able to generate a key and us this key to access all the models I provide.
      • beanaroo
        2 hours ago
        We have tried reaching out to their sales multiple times but never get a response.
    • river_otter
      6 hours ago
      github.com/mozilla-ai/any-llm :)
    • tacoooooooo
      6 hours ago
      pydantic-ai
    • thibault000
      4 hours ago
      [dead]
  • cpburns2009
    7 hours ago
  • abhisek
    5 hours ago
    We just analysed the payload. Technical details here: https://safedep.io/malicious-litellm-1-82-8-analysis/

    We are looking at similar attack vectors (pth injection), signatures etc. in other PyPI packages that we know of.

  • noobermin
    2 hours ago
    I have to say, the long line of comments from obvious bots thanking the opener of the issue is a bit too on the nose.
  • macNchz
    3 hours ago
    Was curious—good number of projects out there with an un-pinned LiteLLM dependencies in their requirements.txt (628 matches): https://github.com/search?q=path%3A*%2Frequirements.txt%20%2...

    or pyproject.toml (not possible to filter based on absence of a uv.lock, but at a glance it's missing from many of these): https://github.com/search?q=path%3A*%2Fpyproject.toml+%22%5C...

    or setup.py: https://github.com/search?q=path%3A*%2Fsetup.py+%22%5C%22lit...

  • Shank
    4 hours ago
    I wonder at what point ecosystems just force a credential rotation. Trivy and now LiteLLM have probably cleaned out a sizable number of credentials, and now it's up to each person and/or team to rotate. TeamPCP is sitting on a treasure trove of credentials and based on this, they're probably carefully mapping out what they can exploit and building payloads for each one.

    It would be interesting if Python, NPM, Rubygems, etc all just decided to initiate an ecosystem-wide credential reset. On one hand, it would be highly disruptive. On the other hand, it would probably stop the damage from spreading.

    • post-it
      32 minutes ago
      It'll only be disruptive to people who are improperly managing their credentials. Cattle not pets applies to credentials too.
  • postalcoder
    6 hours ago
    This is a brutal one. A ton of people use litellm as their gateway.
    • eoskx
      6 hours ago
      Not just as a gateway in a lot cases, but CrewAI and DSPy use it directly. DSPy uses it as its only way to call upstream LLM providers and CrewAI falls back to it if the OpenAI, Anthropic, etc. SDKs aren't available.
    • Imustaskforhelp
      6 hours ago
      Do you feel as if people will update litellm without looking at this discussion/maybe having it be automatic which would then lead to loss of crypto wallets/ especially AI Api keys?

      Now I am not worried about the Ai Api keys having much damage but I am thinking of one step further and I am not sure how many of these corporations follow privacy policy and so perhaps someone more experienced can tell me but wouldn't these applications keep logs for legal purposes and those logs can contain sensitive information, both of businesses but also, private individuals perhaps too?

      • daveguy
        6 hours ago
        Maybe then people will start to realize crypto isn't even worth the stored bits.

        Irrevocable transfers... What could go wrong?

  • mohsen1
    6 hours ago
    If it was not spinning so many Python processes and not overwhelming the system with those (friends found out this is consuming too much CPU from the fan noise!) it would have been much more successful. So similar to xz attack

    it does a lot of CPU intensive work

        spawn background python
        decode embedded stage
        run inner collector
        if data collected:
            write attacker public key
            generate random AES key
            encrypt stolen data with AES
            encrypt AES key with attacker RSA pubkey
            tar both encrypted files
            POST archive to remote host
    • franktankbank
      5 hours ago
      I can't tell which part of that is expensive unless many multiples of python are spawned at the same time. Are any of the payloads particularly large?
  • aborsy
    1 hour ago
    What is the best way to sandbox LLMs and packages in general, while being able to work on data from outside sandbox (get data in and out easily)?

    There is also the need for data sanitation, because the attacker could distribute compromised files through user’s data which will later be run and compromise the host.

  • rgambee
    6 hours ago
    Looking forward to a Veritasium video about this in the future, like the one they recently did about the xz backdoor.
    • stavros
      5 hours ago
      That was massively more interesting, this is just a straight-up hack.
  • kevml
    7 hours ago
  • foota
    2 hours ago
    Somewhat unrelated, but if I have downloaded node modules in the last couple days, how should I best figure out if I've been hacked?
  • cpburns2009
    4 hours ago
    Looks like litellm is no longer in quarantine on PyPI, and the compromized versions (1.82.7 and 1.82.8) have been removed [1].

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

  • 6thbit
    6 hours ago
    title is bit misleading.

    The package was directly compromised, not “by supply chain attack”.

    If you use the compromised package, your supply chain is compromised.

    • dlor
      3 hours ago
      It's both. They got compromised by another supply chain attack on Trivy initially.
  • 0fflineuser
    6 hours ago
    I was running it (as a proxy) in my homelab with docker compose using the litellm/litellm:latest image https://hub.docker.com/layers/litellm/litellm/latest/images/... , I don't think this was compromised as it is from 6 months ago and I checked it is the version 1.77.

    I guess I am lucky as I have watchtower automatically update all my containers to the latest image every morning if there are new versions.

    I also just added it to my homelab this sunday, I guess that's good timing haha.

  • westoque
    2 hours ago
    my takeaway from this is that it should now be MANDATORY to have an LLM do a scan on the entire codebase prior to release or artifact creation. do NOT use third party plugins for this. it's so easy to create your own github action to digest the whole codebase and inspect third party code. it costs tokens yes but it's also cached and should be negligible spend for the security it brings.
    • bink
      21 minutes ago
      Ironically, Trivy was the first known compromised package and its purpose is to scan container images to make sure they don't contain vulnerabilities. Kinda like the LLM in your scenario.
  • wswin
    5 hours ago
    I will wait with updating anything until this whole trivy case gets cleaned up.
  • hmokiguess
    5 hours ago
    What’s the best way to identify a compromised machine? Check uv, conda, pip, venv, etc across the filesystem? Any handy script around?

    EDIT: here's what I did, would appreciate some sanity checking from someone who's more familiar with Python than I am, it's not my language of choice.

    find / -name "litellm_init.pth" -type f 2>/dev/null

    find / -path '/litellm-1.82..dist-info/METADATA' -exec grep -l 'Version: 1.82.[78]' {} \; 2>/dev/null

    • persedes
      5 hours ago
      there's probably a more precise way, but if you're on uv:

        rg litellm  --iglob='*.lock'
    • lukewarm707
      3 hours ago
      these days, i just use a private llm. it's very quick and when i see the logs, it does a better job than me for this type of task.

      no i don't let it connect to web...

  • mark_l_watson
    5 hours ago
    A question from a non-python-security-expert: is committing uv.lock files for specific versions, and only infrequently updating versions a reasonable practice?
    • Imustaskforhelp
      5 hours ago
      (I am not a security expert either)

      But, one of the arguments that I saw online from this was that when a security researcher finds a bug and reports it to the OSS project/Company they then fix the code silently and include it within the new version and after some time, they make the information public

      So if you run infrequently updated versions, then you run a risk of allowing hackers access as well.

      (An good example I can think of is OpenCode which had an issue which could allow RCE and the security researcher team asked Opencode secretly but no response came so after sometime of no response, they released the knowledge in public and Opencode quickly made a patch to fix that issue but if you were running the older code, you would've been vulnerable to RCE)

      • mark_l_watson
        3 hours ago
        Good points. Perhaps there is a way to configure uv to only use a new version if it is 24 hours old?
  • rgambee
    6 hours ago
    Seems that the GitHub account of one of the maintainers has been fully compromised. They closed the GitHub issue for this problem. And all their personal repos have been edited to say "teampcp owns BerriAI". Here's one example: https://github.com/krrishdholakia/blackjack_python/commit/8f...
  • dec0dedab0de
    6 hours ago
    github, pypi, npm, homebrew, cpan, etc etc. should adopt a multi-multi-factor authentication approach for releases. Maybe have it kick in as a requirement after X amount of monthly downloads.

    Basically, have all releases require multi-factor auth from more than one person before they go live.

    A single person being compromised either technically, or by being hit on the head with a wrench, should not be able to release something malicious that effects so many people.

    • worksonmine
      6 hours ago
      And how would that work for single maintainer projects?
      • dec0dedab0de
        5 hours ago
        They would have to find someone else if they grew too big.

        Though, the secondary doesn't necessarily have to be a maintainer or even a contributor on the project. It just needs to be someone else to do a sanity check, to make sure it is an actual release.

        Heck, I would even say that as the project grows in popularity, the amount of people required to approve a release should go up.

        • worksonmine
          5 hours ago
          So if I'm developing something I want to use and the community finds it useful but I take no contributions and no feature requests I should have to find another person to deal with?

          How do I even know who to trust, and what prevents two people from conspiring together with a long con? Sounds great on the surface but I'm not sure you've thought it through.

          • dec0dedab0de
            5 hours ago
            It wouldn't prevent a project that has a goal of being purposely malicious, just from pushing out releases that aren't actually releases.

            As far as who to trust, I could imagine the maintainers of different high-level projects helping each other out in this way.

            Though, if you really must allow a single user to publish releases to the masses using existing shared social infrastructure. Then you could mitigate this type of attack by adding in a time delay, with the ability for users to flag. So instead of immediately going live, add in a release date, maybe even force them to mention the release date on an external system as well. The downside with that approach is that it would limit the ability to push out fixes as well.

            But I think I am OK with saying if you're a solo developer, you need to bring someone else on board or host your builds yourself.

            • worksonmine
              2 hours ago
              Or just don't install every package on the earth. The only supply-chain attack I've been affected by is xz, and I don't think anyone was safe from that one. Your solution wouldn't have caught it.

              Better to enforce good security standards than cripple the ecosystem.

  • smakosh
    1 hour ago
  • faxanalysis
    3 hours ago
    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.
  • xinayder
    6 hours ago
    When something like this happens, do security researchers instantly contact the hosting companies to suspend or block the domains used by the attackers?
    • redrove
      6 hours ago
      First line of defense is the git host and artifact host scrape the malware clean (in this case GitHub and Pypi).

      Domains might get added to a list for things like 1.1.1.2 but as you can imagine that has much smaller coverage, not everyone uses something like this in their DNS infra.

      • itintheory
        1 hour ago
        This threat actor is also using Internet Computer Protocol (ICP) "Canisters" to deliver payloads. I'm not too familiar with the project, but I'm not sure blocking domains in DNS would help there.
  • xunairah
    6 hours ago
    Version 1.82.7 is also compromised. It doesn't have the pth file, but the payload is still in proxy/proxy_server.py.
  • segalord
    5 hours ago
    LiteLLM has like a 1000 dependencies this is expected https://github.com/BerriAI/litellm/blob/main/requirements.tx...
  • dev_tools_lab
    3 hours ago
    Good reminder to pin dependency versions and verify checksums. SHA256 verification should be standard for any tool that makes network calls.
  • lightedman
    2 hours ago
    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.

  • mikert89
    6 hours ago
    Wow this is in a lot of software
    • eoskx
      6 hours ago
      Yep, DSPy and CrewAI have direct dependencies on it. DSPy uses it as its primary library for calling upstream LLM providers and CrewAI falls back to it I believe if the OpenAI, Anthropic, etc. SDKs aren't available.
  • somehnguy
    1 hour ago
    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."

    • kamikazechaser
      31 minutes ago
      Compromised accounts. The malware targeted ~/.git-credentials.
  • oncelearner
    6 hours ago
    That's a bad supply-chain attack, many folks use litellm as main gateway
    • rdevilla
      6 hours ago
      laughs smugly in vimscript
  • 6thbit
    6 hours ago
    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.

    • cpburns2009
      5 hours ago
      The 1.82.7 exploit was executed on import. The 1.82.8 exploit used a pth file which is run at start up (module discovery basically).
  • tom-blk
    5 hours ago
    Stuff like is happening too much recently. Seems like the more fast paced areas of development would benefit from a paradigm shift
    • sirl1on
      5 hours ago
      Move Slow and Fix Things.
  • saidnooneever
    4 hours ago
    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.

  • nickspacek
    6 hours ago
    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
  • Aeroi
    3 hours ago
    whats up with the hundreds of bot replys on github to this?
  • 0123456789ABCDE
    6 hours ago
    airflow, dagster, dspy, unsloth.ai, polar
  • gkfasdfasdf
    6 hours ago
    Someone needs to go to prison for this.
  • rvz
    2 hours ago
    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

  • fratellobigio
    6 hours ago
    It's been quarantined on PyPI
  • johnhenry
    5 hours ago
    I've been developing an alternative to LiteLLM. Javascript. No dependencies. https://github.com/johnhenry/ai.matey/
  • hmokiguess
    5 hours ago
    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
  • kstenerud
    6 hours ago
    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

  • Imustaskforhelp
    6 hours ago
    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.

  • claudiug
    4 hours ago
    LiteLLM's SOC2 auditor was Delve :))
  • homanp
    5 hours ago
    How were they compromised? Phishing?
  • cowpig
    2 hours ago
    Tried running the compromised package inside Greywall, because theoretically it should mitigate everything but in practice it just forkbombs itself?
  • bfeynman
    7 hours ago
    pretty horrifying. I only use it as lightweight wrapper and will most likely move away from it entirely. Not worth the risk
    • dot_treo
      7 hours ago
      Even just having an import statement for it is enough to trigger the malware in 1.82.8.
  • cpburns2009
    6 hours ago
    LiteLLM is now in quarantine on PyPI [1]. Looks like burning a recovery token was worth it.

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

  • danielvaughn
    5 hours ago
    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.

  • otabdeveloper4
    6 hours ago
    LiteLLM is the second worst software project known to man. (First is LangChain. Third is OpenClaw.)

    I'm sensing a pattern here, hmm.

    • ting0
      19 minutes ago
      LLMs recommend LiteLLM, so its popularity will only continue.
    • nickvec
      6 hours ago
      Not familiar with LangChain besides at a surface level - what makes it the worst software project known to man?
      • eoskx
        6 hours ago
        LangChain at least has its own layer for upstream LLM provider calls, which means it isn't affected by this supply chain compromise. DSPy uses LiteLLM as its primary way to call OpenAI, etc. and CrewAI imports it, too, but I believe it prefers the vendor libraries directly before it falls back to LiteLLM.
      • otabdeveloper4
        53 minutes ago
        You have to see it to believe it. Feel the vibes.
  • Blackthorn
    5 hours ago
    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.

    • cpburns2009
      5 hours ago
      safetensors is just as vulnerable to this sort of exploit using a pth file since it's a Python package.
      • Blackthorn
        5 hours ago
        Yeah, fair enough, the problem here is that the credentials were stolen, the fact that the exploit was packaged into a .pth is just an implementation detail.
  • zhisme
    5 hours ago
    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?
  • chillfox
    6 hours ago
    Now I feel lucky that I switched to just using OpenRouter a year ago because LiteLLM was incredible flaky and kept causing outages.
  • iwhalen
    7 hours ago
    What is happening in this issue thread? Why are there 100+ satisfied slop comments?
  • deep_noz
    7 hours ago
    good i was too lazy to bump versions
    • jadamson
      6 hours ago
      In case you missed it, according to the OP, the previous point release (1.82.7) is also compromised.
      • dot_treo
        6 hours ago
        Yeah, that release has the base64 blob, but it didn't contain the pth file that auto triggers the malware on import.
        • jadamson
          6 hours ago
          The latest version with the the pth file doesn't require an import to trigger the exploit (just having the package installed is enough thanks to [1]).

          The previous version triggers on `import litellm.proxy`

          Again, all according to the issue OP.

          [1] https://docs.python.org/3/library/site.html

  • canberkh
    2 hours ago
    helpful
  • te_chris
    5 hours ago
    I reviewed the LiteLLM source a while back. Without wanting to be mean, it was a mess. Steered well clear.
    • rnjs
      5 hours ago
      Terrible code quality and terrible docs
  • TZubiri
    6 hours ago
    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.

    • xinayder
      6 hours ago
      > 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.

      Programming for different LLM APIs is a hassle, this library made it easy by making one single API you call, and in the backstage it handled all the different API calls you need for different LLM providers.

      • hrmtst93837
        3 hours ago
        One wrapper cuts API churn, but it also widens the supply-chain blast radius you own.
      • TZubiri
        4 hours ago
        >Programming for different LLM APIs is a hassle

        That's what they pay us for

        I'd get it if it were a hassle that could be avoided, but it feels like you are trying to avoid the very work you are being paid for, like if a MCD employee tried to pay a kid with Happy Meal toys to work the burger stand.

        Another red flag, although a bit more arguable, is that by 'abstracting' the api into a more generic one, you achieving vendor neutrality, yes, but you also integrate much more loosely with your vendors, possibly loose unique features (or can only access them with even more 'hassle' custom options, and strategically, your end product will veer into commodity territory, which is not a place you usually want to be.

      • otabdeveloper4
        6 hours ago
        There's only two different LLM APIs in practice (Anthropic and everyone else), and the differences are cosmetic.

        This is like a couple hours of work even without vibe coding tools.

    • circularfoyers
      6 hours ago
      Comparing this project to is-odd seems very disingenuous to me. My understanding is this was the only way you could use llama.cpp with Claude Code for example, since llama.cpp doesn't support the Anthropic compatible endpoint and doing so yourself isn't anywhere near as trivial as your comparison. Happy to be corrected if I'm wrong.
      • jerieljan
        4 hours ago
        That's a correct example, and I agree, it is disingenuous to just trivially call this an `is-odd` project.

        Back in the days of GPT-3.5, LiteLLM was one of the projects that helped provide a reliable adapter for projects to communicate across AI labs' APIs and when things drifted ever so slightly despite being an "OpenAI-compatible API", LiteLLM made it much easier for developers to use it rather than reinventing and debugging such nuances.

        Nowadays, that gateway of theirs isn't also just a funnel for centralizing API calls but it also serves other purposes, like putting guardrails consistently across all connections, tracking key spend on tokens, dispensing keys without having to do so on the main platforms, etc.

        There's also more to just LiteLLM being an inference gateway too, it's also a package used by other projects. If you had a project that needed to support multiple endpoints as fallback, there's a chance LiteLLM's empowering that.

        Hence, supply chain attack. The GitHub issue literally has mentions all over other projects because they're urged to pin to safe versions since they rely on it.

  • qcautomation
    22 minutes ago
    [dead]
  • devnotes77
    1 hour ago
    [dead]
  • pugchat
    3 hours ago
    [dead]
  • jamiemallers
    5 hours ago
    [dead]
  • maxothex
    5 hours ago
    [dead]
  • matrixgard
    7 hours ago
    [dead]
  • ddactic
    6 hours ago
    [dead]
  • osaka2077
    4 hours ago
    [dead]
  • rsmtjohn
    6 hours ago
    [dead]
  • peytongreen_dev
    6 hours ago
    [flagged]
  • mitul005
    6 hours ago
    [dead]
  • bustah
    2 hours ago
    [dead]
  • dot_treo
    7 hours ago
    [dead]
  • thibault000
    5 hours ago
    [dead]
  • sy0115
    2 hours ago
    [dead]
  • bustah
    2 hours ago
    [dead]
  • hahaddmmm12x
    6 hours ago
    [flagged]
  • iamnotai666
    2 hours ago
    [dead]