NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · LiteLLM

GHSA-5mg7-485q-xm76: Two LiteLLM versions published containing credential harvesting malware

critical

LiteLLM 1.82.7 and 1.82.8 on PyPI contain credential-stealing malware. They were uploaded after a maintainer's token was exposed and stayed live for about 40 minutes on March 24, 2026. Anyone who installed and ran either version should treat every secret on that machine as stolen and rotate it. The advisory lists no patched version; the vendor names 1.82.6 and earlier, or 1.83.0, as clean.

Published Mar 25, 2026 · Updated Mar 27, 2026 · Analysis Oct 31, 2026

What an attacker can do

This is a supply chain compromise (CWE-506), not a coding bug. The vendor says the attacker bypassed the official CI/CD and uploaded packages straight to PyPI, possibly via a compromised Trivy dependency in the CI scanning. Version 1.82.7 carries the payload in litellm/proxy/proxy_server.py. Version 1.82.8 adds litellm_init.pth, which runs on every Python process start once litellm is installed, so importing litellm is not required. The .pth file spawns a child Python process that also triggers the file, which caused a fork bomb in one test.

The malware collects environment variables, SSH keys, .env files, AWS, GCP and Azure credentials, Kubernetes configs, database passwords, shell history, cloud metadata and crypto wallet files. It encrypts the bundle and POSTs it to models.litellm.cloud, which is not a LiteLLM domain. With a Kubernetes service account token, it reads secrets across all namespaces and tries to start privileged alpine:latest pods in kube-system that mount the host filesystem.

LiteLLM sits in front of many provider keys, so a single host can hold keys for several LLM vendors.

Who is affected

Packages from PyPI at litellm 1.82.7 and 1.82.8, installed during roughly 10:39 to 16:00 UTC on March 24, 2026 by an unpinned pip install, or pulled in by an unpinned transitive dependency such as an agent framework or MCP server. Docker images built then with an unpinned install are affected too. The vendor says the official ghcr.io/berriai/litellm image, LiteLLM Cloud, 1.82.6 and earlier, and source installs from GitHub are not affected. Check with:

pip show litellm

litellm

Ecosystem
PyPI
Affected
>= 1.82.7, <= 1.82.8
Fixed in
No patched version yet
Check
pip show litellm

How to fix it

No patched version is recorded in the advisory, because the malicious releases were removed. The vendor says to pin LiteLLM to 1.82.6 or earlier, or to the later verified release 1.83.0 built by its new CI/CD pipeline.

pip install "litellm==1.83.0"

Then remove litellm_init.pth from site-packages and rotate all secrets on affected systems: API keys, cloud keys, database passwords, SSH keys and Kubernetes tokens. Audit CI pipelines, Docker builds and deployment logs for the two bad versions. Treat the host as compromised and investigate it.

How to tell if you were hit

Look for these indicators:

  • litellm_init.pth in site-packages
  • ~/.config/sysmon/sysmon.py and the user service ~/.config/systemd/user/sysmon.service
  • /root/.config/sysmon/sysmon.py on Kubernetes nodes
  • outbound traffic to models.litellm.cloud or checkmarx.zone
  • pods named node-setup-* or privileged alpine:latest pods in kube-system

Also search CI and build logs for litellm 1.82.7 or 1.82.8, and check for runaway Python processes.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

After an API Token exposure from an exploited trivy dependency, two new releases of litellm were uploaded to PyPI containing automatically activated malware, harvesting sensitive credentials and files, and exfiltrating to a remote API.

Anyone who has installed and run the project should assume any credentials available to litellm environment may have been exposed, and revoke/rotate thema ccordingly.

Questions

Is the official LiteLLM Docker image affected?

No, according to the vendor. The image at ghcr.io/berriai/litellm pins its dependencies and does not use the compromised PyPI packages. Images you built with an unpinned pip install in the window are affected.

I never imported litellm in 1.82.8. Am I safe?

No. The litellm_init.pth file runs on every Python process start after install, so the payload ran without any import.

What should I do first?

Remove the package and litellm_init.pth, check for the sysmon persistence files, and rotate all credentials the host could read. Pin to 1.82.6 or earlier, or 1.83.0.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More LiteLLM vulnerabilities

All LiteLLM entries