LiteLLM security: two supply chain attacks, the cosign key and the LTS pilot
For many teams LiteLLM is the gateway to every language model, which means it holds every provider's keys in one place. That is exactly where attackers struck twice in 2026: in March through a compromised scanner in CI, in October through a forgotten key that led all the way to the owner of the GitHub organisation. The second time, the malicious package carried a valid signature. This article separates what is established from our own assessment and uses our own measurements from 4 November 2026 to show what cosign achieves today and what the new LTS pilot leaves open.
Key points
- March 2026:
litellm1.82.7 and 1.82.8 on PyPI with a credential stealer. Cause: an unpinned, compromised Trivy in CI and static release credentials. The official Docker image was not affected. - October 2026:
litellm1.107.0 on PyPI and the Docker tagsv1.107.0,latest,main-latest,main-stable. Cause: a key leaked in May and never revoked, which led to the token of a GitHub organisation owner. - cosign: the malicious images were validly signed. Since 24 October a new key signs (fingerprint
e3fe3e08…); LiteLLM trusts the old one only for images published before the v1.107.0 release on 21 October. - LTS pilot: one month from the week of 2 November on the 1.108 line. The announcement does not mention security fixes, and the rule of four supported lines is paused.
- Our recommendation: check for traces, pin by version and digest, verify the new key and the build source, block outbound traffic and apply updates with a cooldown. Commands and order are further down.
The situation in brief
LiteLLM puts more than 100 model providers behind one OpenAI-compatible API; Datadog cites about 23 million downloads a week. As a proxy it keeps provider keys, virtual keys and database access in one place. That makes it a rewarding target: the October infostealer went straight for the tables in which the proxy stores its provider keys.
Anyone assessing LiteLLM's security should keep three levels apart:
- Supply chain: two attacks in seven months with entirely different points of entry.
- Application: 18 published security advisories since April 2026, five of them critical; three flaws are listed in CISA's KEV catalogue.
- Operations: a key rotation, a new release rhythm, the LTS pilot and 25 public commitments with deadlines running to January 2027.
March 2026: 1.82.7 and 1.82.8
On 24 March 2026 at 10:39 UTC litellm==1.82.7 appeared on PyPI, followed shortly by
1.82.8. PyPI quarantined both after about 40 minutes, and by 16:00 UTC they had been deleted. LiteLLM
therefore gives 10:39 to 16:00 UTC as the window to check.
According to LiteLLM the cause lay in the Trivy scanner, which ran unpinned in CI. Trivy had been compromised on 19 March; Datadog attributes this to the TeamPCP campaign, which spread through npm and Checkmarx KICS to PyPI. In the shared CircleCI environment the release credentials for PyPI, GHCR and Docker sat in static environment variables. The attacker used them to publish directly to PyPI, bypassing the pipeline.
- Payload: 1.82.7 carried the malware in
proxy_server.py, 1.82.8 also inlitellm_init.pth, which Python runs at every start. It looked for environment variables, SSH keys, cloud credentials, Kubernetes tokens and database passwords, and sent the results encrypted tomodels.litellm[.]cloud. - Persistence: Datadog also describes
~/.config/sysmon/sysmon.pywith the servicesysmon.service, follow-up downloads viacheckmarx[.]zoneand, in Kubernetes, privileged pods namednode-setup-*. - Not affected: the official proxy image, because it pins its dependencies, as well as LiteLLM Cloud and installations from the GitHub source. Anyone pulling LiteLLM indirectly and unpinned through an agent framework or an MCP server could be affected, however.
- Response: packages removed, credentials and maintainer accounts changed, releases paused, Mandiant and Veria Labs brought in. At the end of March came v1.83.0 and the new "CI/CD v2" pipeline with separated environments, Trusted Publishing for PyPI, immutable Docker tags and cosign signatures.
- Scale: according to Help Net Security, Hudson Rock analysed a 153 GB archive from this attack in August and linked it to 2,488 corporate domains; CloudSEK arrives at close to 2,500 organisations. These are third-party figures that we could not verify.
October 2026: 1.107.0
The authoritative account is the root cause analysis of 23 October, which LiteLLM itself calls the canonical record. The first version of 21 October is partly out of date.
The chronology, all times in UTC:
- 27 May, 18:53: the file
opencode.jsoncontaining an admin key for the internal "LiteLLM Agent Platform" lands in the public repositoryLiteLLM-Labs/lite-harness. Three hours later the file is gone and revocation has been noted, but through human error it never happens. The commit stays in the public history until 22 October. - 10 Oct, 21:27: a call to the Agent Platform API returns the configuration of every agent and with it the GitHub CLI OAuth token of one of the two organisation owners. Such tokens are not scoped and do not ask for a second factor again on sensitive actions.
- 10 Oct, 22:11 and 22:12: throwaway branches
ci-tmp-*with the innocuous commitci: bump cache configsend CI secrets towebhook.site, including the tokens of two more maintainers. The runs are deleted minutes later. - 12 Oct, 12:08 to 12:30: a second round across private repositories. Socket counts 20 secret names in total, including provider keys, a GitGuardian key and database credentials. LiteLLM rates this part as of low sensitivity.
- 13 Oct: the domain
litellm.devand the GitHub accountletters9813are created. - 19 Oct: to allow daily backports, LiteLLM relaxes release approval: instead of an account tied to a device in the office, any two engineers now suffice.
- 21 Oct, 10:08: branch protection rejects commit
9cf97e9in the privateBerriAI/project-releaser, which introduces a freely selectable source organisation. Five seconds later the owner token forces it through. - 10:46 and 11:11: staging runs against the fork
Berri-AI/litellm(commit20535d8f), and the second token approves production. - 11:39:51 to 11:40:13: seven wheels on PyPI. 11:46:56: images on Docker Hub and GHCR.
- 11:53 and 12:09 to 12:24: the third token removes the run logs, and a force push with the owner token removes the traces in the workflow.
- 12:06: Lidor Machluf of Upwind reports the finding in issue #47826. LiteLLM begins its response at 13:02.
- By 13:23: PyPI quarantine. By 13:51: GHCR tags unavailable. 14:20: Docker Hub tags removed or repointed to clean images.
Payload: the wheels and images placed cook.pth, cook.py and
sitecustomize.py in site-packages. Python runs them at every start, even if LiteLLM is
never imported. The infostealer, named privcollect, collected browser passwords, SSH and GPG keys,
cloud credentials including the metadata service, Kubernetes, Vault and CI secrets, the environment of every
readable process and the credentials of many AI tools. If DATABASE_URL was set, it read
LiteLLM_CredentialsTable and LiteLLM_ProxyModelTable. The data left encrypted with AES-256
and RSA-4096 for www.litellm[.]dev/healthcheck. A second part polled a file of the account
letters9813 every hour for a domain serving further code; Wiz and Datadog saw only test values there
and no second stage.
Consequences: Wiz counts about 49,000 PyPI downloads; according to StepSecurity that includes CI caches and mirrors but not container pulls. About four and a half hours after the exfiltration, between 16:20 and 17:01 UTC, the attacker according to Wiz tested stolen AWS roles from CI runners and Kubernetes nodes and queried Bedrock models, which fits LLMjacking. Customers of the private enterprise registry were not affected. According to Datadog, no link to March has been established.
Outdated account: the first version suspected that the tokens came from the logs of an internal, publicly reachable LiteLLM instance that the attacker had entered through a recently patched flaw. It also mentioned that Claude Code embeds a GitHub CLI token in a response in certain situations. Much of this was quoted and is not correct as it stands. The first token came from the Agent Platform API. On 24 October LiteLLM's director of security clarified that no specific flaw lay behind the conjecture about a patched vulnerability, and that the token observation was not the attack path. It was being looked into further with Anthropic.
Why the March hardening did not hold
From the outside both incidents look alike, but the attack surfaces have little in common. The comparison follows LiteLLM's account of 30 October, with the affected artefacts added:
| March 2026 | October 2026 | |
|---|---|---|
| Point of entry | compromised dependency running in CI | leaked API key of an experimental internal service |
| What the attacker held | static release credentials from environment variables | an organisation owner's token, then more through throwaway workflows |
| Role of the pipeline | none, direct publishing with stolen keys | built, signed and published foreign source code through the normal path |
| Artefacts | unsigned, outside the pipeline | validly signed, valid Trusted Publishing origin |
| Affected | PyPI only | PyPI and Docker images including floating tags |
| Available | about 40 minutes until quarantine | PyPI about 1¾ hours, Docker Hub about 2½ hours |
According to LiteLLM, the March controls continue to protect against attacks through dependencies and also limited the damage in October, for instance because existing release tags could not be overwritten. Against an organisation owner, however, no control inside the organisation helps, because the owner owns the pipeline. One detail stands out: the approval relaxed on 19 October was an exception to allow more backports. It was not decisive, because the owner token could have changed the rule anyway. LiteLLM suspects that the separate tokens were mainly meant to produce less conspicuous audit logs.
The cosign key
Since v1.83.0 LiteLLM has signed its images with cosign, using a static key pair. Such a signature says:
someone holding the private key signed this image. It does not say that the image is harmless, nor which source
code it came from. October demonstrated both limits: the pipeline signed the malicious image itself, and
cosign verify passes it.
What happened
- Old key: commit
0112e53of 31 March 2026, SHA-256 of the fileff8869bf14ba9d10.af7b64b9d479543b 44daec0165e71575 3c43ff8a998f6dd3 - Exposure: LiteLLM believes the private half was exposed when further credentials were harvested. It names no date; the exfiltration it describes falls on 10 and 12 October.
- New key: commit
e82a3c6, pull request #48103, merged on 23 October at 21:38 UTC, SHA-256 of the filee3fe3e08c44b1640. The first releases using it, on 24 October, were v1.103.8, v1.104.6, v1.105.4 and v1.106.3. Helm charts are signed with it too.7fe0b37c43b4f8b6 03b3a0f4ee74c29e 647bc022d762c2c0 - LiteLLM's rule: trust signatures from the old key only on images published before the v1.107.0 release on 21 October.
- Communication: at first the release notes demanded the change without giving a reason. Only when asked did LiteLLM confirm on 24 October in issue #48215 that this was not routine. On 29 October issue #49052 pointed out that the rotation commit itself showed as unverified on GitHub (
unknown_key). On 30 October the author registered his signing key and LiteLLM published the fingerprint in the incident post. Until then the documentation still pointed to the old key, which fails on new releases. - Outlook: LiteLLM says keyless signing is being considered, with no date.
What we measured
On 4 November 2026 we verified with cosign 2.6.1, queried the Rekor transparency log in full for both keys and read the registries directly. We read metadata only and did not start any LiteLLM image.
| Image on GHCR | Old key | New key | Transparency log entry (UTC) |
|---|---|---|---|
v1.106.2 | valid | invalid | 21 Oct, 10:47:58 |
v1.106.3 | invalid | valid | 24 Oct, 09:26:57 |
v1.106.7 | invalid | valid | 4 Nov, 04:27:30 |
v1.108.0 | invalid | valid | 4 Nov, 03:33:29 |
v1.107.0, index 1bbcb1443bc9… | Image gone: HTTP 404 on GHCR and Docker Hub | 21 Oct, 11:47:52 (GHCR) and 11:48:00 (Docker Hub), old key | |
- The cut is clean: between v1.106.2 and v1.106.3 the key changes, as LiteLLM describes. We computed both fingerprints from the commits ourselves and they match. The key embedded in the documentation for the Policy Controller is the same as in the commit.
- The old key still works: it still confirms v1.106.2 today. A static key does not expire, and verification consults no revocation list. Trust in it ends only when every verifier removes it from their policy.
- The log supplies the time: every signature we checked has a Rekor entry with a timestamp that not even an attacker holding the key can backdate. The old key has 2,184 entries from 3 April to 21 October, 11:48:28 UTC, that is up to the malicious version, and none later. The new one has 318 from 24 October, 07:57:57 UTC onwards.
- The limit of this check: the log shows only what was entered. That is why you should never set
--insecure-ignore-tlog. Moreover, 389 entries by the old key fall between the token theft of 10 October and the malicious version. Cryptographically they cannot be separated from possible forgeries. We have no indication of a forgery, and LiteLLM confirmed on 24 October that all images publicly reachable at that time are genuine. That remains a statement by LiteLLM, however, not proof. - PyPI remains unsigned: PyPI's integrity endpoint returns HTTP 404 for all 16 files of 1.106.7 and 1.108.0; as a cross-check it returns HTTP 200 for
sigstoreandurllib3. The cosign signatures likewise cover only images and Helm charts. For Python installations, hash pins remain the tool for now.
Our assessment of the key management
The rotation itself was right and is technically clean. The communication lagged behind the technology: anyone
who had pinned the key in a policy at first learned the reason only by asking. Three points remain open.
First, the key and the fingerprint sit on systems of the same organisation that the attacker
controlled as owner. The fingerprint is in the blog, so outside the code repository but not outside the
organisation. Keep the key yourself and compare it with the value above from 4 November. Second,
where the new private key is held has not been publicly described; cosign does not appear among the 25
commitments. We found no help beyond the date rule for identifying safely signed older versions, as announced in
issue #48215, and the SECURITY.md, also announced there, did not mention cosign by 4 November.
Third, keyless signing solves the problem of long-lived keys but would not have prevented
October: the real workflow would still have signed. What matters is a check running outside GitHub. LiteLLM plans
one by 31 December.
The LTS pilot
On 2 November LiteLLM announced two changes: from the week of 2 November, release candidates and stable versions appear on Tuesdays instead of Saturdays, in line with Patch Tuesday. In addition, a long-term support line is being piloted for one month, starting with 1.108.
What is established
- Audience: teams that want to stay on one version and still receive fixes without upgrading every week.
- Content: patch releases with fixes for LLM translation and cost tracking, and with new endpoints.
- Paused: the rule in force since 29 June of maintaining the four most recent stable lines. With about one new line a week it meant roughly a month of maintenance per line.
- Status on 4 November: 1.108.0 appeared at 03:35 UTC, with no patch yet. 1.106.7 followed at 04:28 UTC, so the older line still received an update after the pilot began. There is no stable 1.107 line; LiteLLM is skipping it.
What remains open
- Neither the announcement nor the pilot page lists security fixes. The exception for severe problems is on the page of the paused rule.
- Nothing says what happens to the 1.108 line after the month, whether there will be further LTS lines or how long they would be maintained.
- What the pause means for lines 1.103 to 1.106 is not described.
- Beneath the pause notice, the version support page still says there is no separate LTS track. The commit for the pilot page explicitly trimmed it to confirmed details, so apparently nothing more had been decided.
Our assessment
We consider the direction sensible. LiteLLM itself names the cost of many lines: each fix per line is another release, and during the October embargo the release team spent three weeks mostly on backports. The relaxed approval of 19 October grew out of the same pressure. Fewer lines mean fewer releases and less reason for exceptions. This connection is ours; LiteLLM does not justify the pilot on security grounds.
It does not yet work as a security promise. One month is not long-term support. New endpoints in patch releases mean new attack surface in a line that promises stability; several 2026 advisories concern individual endpoints in particular. And LiteLLM now assumes that attacks no longer follow advisories but already follow releases. Staying on one version therefore protects you only if security fixes reach it reliably and quickly. That is exactly what the announcement does not say.
Our recommendation: move to 1.108 if an upgrade is due anyway, but do not build your operations on it. Keep a line change rehearsed, with staging and a way back. If you are an enterprise customer, ask through your support channel in writing about security fixes and duration. Reassess the terms in early December.
Vulnerabilities in the application
The supply chain is only half the story. LiteLLM has published 18 security advisories on GitHub, all between 3 April and 27 October 2026: five critical, six high, five medium, two low. A high number also means people are looking. LiteLLM started a bug bounty programme in April and works with external reviewers. Its October town hall reports 65 security fixes between 24 September and 12 October. For operators the finding still stands: the proxy needs prompt updates. A selection:
| Date | Advisory | Severity | What it is about | Fixed in |
|---|---|---|---|---|
| 20 Apr | GHSA-r75f-5x8p-qvmcCVE-2026-42208 | critical | SQL injection in API key verification, reachable without login. In the KEV catalogue since 8 May. | 1.83.7 |
| 21 Apr | GHSA-v4p8-mg3p-g94gCVE-2026-42271 | high | Command execution for logged-in users through MCP stdio test endpoints. In the KEV catalogue since 8 June. | 1.83.7 |
| 28 May | GHSA-4xpc-pv4p-pm3wCVE-2026-49468 | critical | Authentication bypass via the Host header | 1.84.0 |
| 30 Jun | GHSA-7488-6r32-c95qCVE-2026-59822 | high | MCP authentication bypass through the OAuth2 passthrough. In the KEV catalogue since 2 September. | 1.84.0 |
| 30 Sep | GHSA-7hp6-4w63-5g45CVE-2026-114612 | critical (9.9) | From internal user to proxy admin and command execution, because one key served two purposes | 1.100.4, 1.101.3, 1.102.2, 1.103.1 |
| 27 Oct | GHSA-w4c7-34wj-hqm8 | critical (10.0) | File read without login, for example /proc/self/environ with the master key. Only with an enterprise licence. | 1.103.10, 1.104.8, 1.105.6, 1.106.5 |
- Attacker speed: Sysdig saw the first targeted attempt against CVE-2026-42208 36 hours and 7 minutes after the advisory appeared in the global database. The queries went for the tables holding the keys. Sysdig did not observe any onward use in that case.
- Private registry: the most severe fixes will in future go to customers first through a private registry. For
GHSA-w4c7this ran as a pilot from 6 to 27 October. LiteLLM wants to include open source users but is still working out how. All fixes are to continue appearing publicly, which may mean later for open source users. - Safer defaults: since v1.104.0 the proxy starts only with a strong master key and MCP stdio is off (
LITELLM_ENABLE_MCP_STDIO); since v1.105.0 so is/sso/debug(ENABLE_SSO_DEBUG). Check this before upgrading, as existing installations may depend on them.
What LiteLLM has committed to
On 30 October LiteLLM published 25 commitments with deadlines and says it will keep the table up to date. When we read it on 4 November, 3 were complete, 13 in progress and 9 planned:
| Deadline | Commitments (shortened) |
|---|---|
| complete | Release approval only through an account tied to an office device; dedicated owner accounts without tokens or gh; audit logs in Splunk with alerts |
| 15 Nov 2026 | Alert on token activity by owner accounts; regular users may use agents but may never be owners or admins; separate Google Workspace admins; HackerOne; private registry |
| 30 Nov 2026 | Okta with phishing-resistant MFA everywhere; secret scanning and push protection in all repositories; a ticket for every revocation; identity-aware proxy in front of all internal services; alerts on the attacker's steps; Chainguard for dependencies; first fixes from Trail of Bits |
| 31 Dec 2026 | Restrict OAuth apps and tokens; rulesets without exceptions for main and the release repository; an external verifier compares PyPI packages and images with the tag and pulls them automatically on mismatch; anomaly detection; two new security roles |
| 31 Jan 2027 | Automations only as a GitHub App or with short-lived tokens; secrets in environments restricted to protected branches |
In our view two measures address a repeat most directly: the rulesets without exceptions and the external verifier. Both are not due until the end of December. Until then, checking after publication remains with operators.
Recommendations for operators
We tested the check commands on 4 November, the search for traces against test directories. Each prints a finished result. The details on uv and Dependabot come from their documentation.
1.Check for exposure
| Artefact | Window (UTC) | Indicators |
|---|---|---|
PyPI litellm 1.82.7, 1.82.8 | 24 Mar, 10:39 to 16:00 | litellm_init.pth, ~/.config/sysmon/sysmon.py, traffic to models.litellm[.]cloud and checkmarx[.]zone |
PyPI litellm 1.107.0 | 21 Oct, 11:39:51 to 13:23 | cook.pth, cook.py, /tmp/.pc_once_72129118c59f5636c0bb, /tmp/remote_code_loader.lock, traffic to www.litellm[.]dev and to the account letters9813 on raw.githubusercontent.com |
Docker Hub litellm/litellm | 21 Oct, 11:46:56 to 14:20 | Tags v1.107.0, latest, main-latest, main-stable, index 1bbcb1443bc9… |
GHCR berriai/litellm, -database, -non_root | 21 Oct, 11:46:56 to 13:51 at the latest | The same tags, indexes 1bbcb1443bc9…, c00f9d92c427…, 7b00e91cd2fe… |
Search with the shell only, not with Python: in an infected environment every Python start runs the malware again,
including pip show. We deliberately do not search for sitecustomize.py, because Ubuntu, for
one, also uses this file name legitimately. An empty result is no proof, as containers and the clean-up of
/tmp remove traces.
find / /tmp -xdev \( -name cook.pth -o -name cook.py -o -name litellm_init.pth -o -path '*/litellm-1.107.0.dist-info' -o -path '*/litellm-1.82.[78].dist-info' -o -name .pc_once_72129118c59f5636c0bb -o -name remote_code_loader.lock -o -path '*/.config/sysmon/sysmon.py' \) -print 2>/dev/null | grep . || echo "no indicators found (this does not prove the host is clean)"
docker images --digests --format '{{.Repository}}:{{.Tag}} {{.Digest}}' | grep -E 'sha256:(1bbcb1443bc9|c00f9d92c427|7b00e91cd2fe|bd1aeee419ea|56b74573eed6|24581ddc3076|827dd893c74c|645a67d81062|f75c8edae59b)' || echo "no known v1.107.0 image digest found locally"
- Logs: search DNS, proxy and firewall logs for the domains in the table now, before retention deletes 21 October. Both infostealers sent their haul to domains that look like LiteLLM.
- Mirrors: the fact that the packages are gone from PyPI and the registries says nothing about your own caches. Check package proxies, registry caches and old CI caches for the versions and digests listed, and delete anything you find.
- Indirect use: LiteLLM also arrives as a dependency of agent frameworks and MCP servers. Search your lockfiles and CI logs for the three versions.
If you get a hit: do not start Python there. From the shell, delete the malicious files along with
__pycache__/cook*.pyc and sitecustomize*.pyc from every affected
site-packages, kill the daemon holding /tmp/remote_code_loader.lock, and preferably
rebuild the image or system. Assume exfiltration if the host could reach the internet, and rotate everything within
reach: instance and task roles, every provider key in the proxy database, master and virtual keys, the password in
DATABASE_URL and all secrets in environment variables. Check CloudTrail for
GetCallerIdentity and for use of the role from outside. If personal data may be affected, controllers
face the 72-hour notification deadline under Art. 33 GDPR; entities under NIS2 have their own reporting
duties.
2.Choose a version and pin it
As of 4 November we recommend a version signed with the new key that contains the fix for GHSA-w4c7.
1.106.2, named in the incident report, is clean but older than these fixes and the removal of the eMudhra
root CA from the certificate bundles.
| Reference on GHCR | Digest on 4 Nov | Note |
|---|---|---|
v1.108.0, latest, main-stable | sha256:c560d317136880ea… | First LTS line, released on 4 Nov |
v1.106.7 | sha256:be24d7da11f4063c… | released on 4 Nov |
main-latest, v1.109.0-rc.1 | sha256:030121401c60d732… | Release candidate, see below |
v1.106.2 | sha256:7294b90f868c5c38… | old key, predates the malicious version |
v1.107.0 | HTTP 404 | removed from GHCR and Docker Hub |
- If you want a cooldown: 1.106.6 and 1.105.7 from 28 October or 1.104.8 and 1.103.10 from 27 October have already had a week. The new key also confirms 1.105.7, 1.104.8 and 1.103.10 in our check.
- Always version plus digest: a floating tag would have fetched the malicious image in October. The pin in Compose or Helm looks like this:
ghcr.io/berriai/litellm:v1.108.0@sha256: c560d317136880ea 92d62334d4367ab1 0955b1af189dd3ea 24f6551290b1d6c1 - The
main-latesttrap: according to the documentation this tag is no longer updated. Measured on 4 November, it points to the same digest asv1.109.0-rc.1, that is, a release candidate. Replace it immediately. - Python: pin with hashes (
pip install --require-hashes -r requirements.txt). This protects against files swapped later, but not against a malicious version you add yourself.
3.Verify signature and source
Keep the public key in your own repository and check it against the fingerprint. The variant that loads the key via a release tag relies on tag protection rules, which an organisation owner can override. Use the commit path instead.
curl -fsSL https://raw.githubusercontent.com/BerriAI/litellm/e82a3c646908ba0a6ee0beddc4310d7a6cac4065/cosign.pub -o litellm-cosign.pub
echo "e3fe3e08c44b16407fe0b37c43b4f8b603b3a0f4ee74c29e647bc022d762c2c0 litellm-cosign.pub" | sha256sum -c -
cosign verify --key litellm-cosign.pub ghcr.io/berriai/litellm:v1.108.0 >/dev/null && echo "OK: signature valid" || echo "REJECT: signature invalid"
# stderr should also report "Existence of the claims in the transparency log was verified offline"
The decisive addition is the build source. BuildKit stores it in the image as SLSA provenance. Upwind and StepSecurity
read the fork Berri-AI/litellm there for v1.107.0, but BerriAI/litellm for v1.106.2. Datadog
points out that the provenance faithfully recorded the foreign source. This check would therefore have caught October.
It is no proof, though: the entry comes from the build itself, and a more careful attacker could forge it more
deliberately.
docker buildx imagetools inspect ghcr.io/berriai/litellm:v1.108.0 --format '{{json (index .Provenance "linux/amd64").SLSA.runDetails.metadata.buildkit_metadata.vcs}}' | grep -q '"source": "https://github.com/BerriAI/litellm"' && echo "OK: built from BerriAI/litellm" || echo "REJECT: unexpected build source"
If you have to keep running an image signed with the old key for a short while, check the timestamp from the transparency log against the start of the malicious version and plan the move:
curl -fsSL https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub -o litellm-cosign-old.pub
echo "ff8869bf14ba9d10af7b64b9d479543b44daec0165e715753c43ff8a998f6dd3 litellm-cosign-old.pub" | sha256sum -c -
cosign verify --key litellm-cosign-old.pub ghcr.io/berriai/litellm:v1.106.2 2>/dev/null | python3 -c 'import json,sys,datetime as d; t=json.load(sys.stdin)[0]["optional"]["Bundle"]["Payload"]["integratedTime"]; print(d.datetime.fromtimestamp(t,d.timezone.utc).isoformat(), "OK: logged before 2026-10-21 11:39 UTC" if t<1792582740 else "REJECT: logged after the malicious release began")'
Run these checks on a clean machine. Remove the old key from admission policies such as the Sigstore Policy Controller. The new key is sufficient there once all images have been updated.
4.Isolate the gateway
- Block outbound traffic: allow only the model providers you use. LiteLLM recommends this in the advisory for
GHSA-w4c7, and its director of security considers default-deny egress a very good way to run the proxy in general. On a host secured like this, the malware from both incidents would still have run, but its haul would not have left, because the destinations are on no allowlist. The same applies to future malicious versions, as long as they do not exfiltrate through allowed destinations. - Off the public internet: VPN, mTLS, an authenticating ingress or an IP allowlist, as LiteLLM advises in the same advisory.
- Allow only the paths you use: we recommend an exact allowlist at the reverse proxy with default deny rather than a blocklist. Blocklists go stale with every release, and new endpoints will now arrive even in LTS patches. The admin UI and management API belong on an admin network only.
- Secrets: load the master key from a secret manager rather than the process environment and set a separate
LITELLM_SALT_KEY. Limit provider keys at the provider itself, for example through budgets and permissions; this limits the damage if one leaks. - Features off: leave MCP stdio and
/sso/debugswitched off unless you need them. InGHSA-7hp6the route to command execution ran through MCP stdio. - Treat logs as secrets: the episode with tokens in responses shows that bodies can contain credentials, even if this was not the attack path in October. Log bodies only when you need them, and protect the logs accordingly.
5.Apply updates with a cooldown
Both malicious versions were gone again within hours. Anyone adopting new versions only after a few days would have installed neither. LiteLLM itself announced such a waiting period for its own CI after March.
# pip: only consider files uploaded at least three days ago
pip install --uploaded-prior-to P3D litellm
# uv: pyproject.toml
[tool.uv]
exclude-newer = "7 days"
# Dependabot: .github/dependabot.yml, version updates only
cooldown:
default-days: 7
In our test with pip 26.2.1 on 4 November, P3D resolved to 1.106.6, and without the option to 1.108.0.
The option works only with indexes that provide upload timestamps; check this for internal mirrors. The cooldown
applies to ordinary updates. For security fixes you need a fast lane, because the first attempt against CVE-2026-42208
came after 36 hours. Dependabot already separates the two: cooldown applies only to version updates, not
security updates. With the new rhythm LiteLLM releases appear on Tuesdays, so plan your maintenance window for later
in the week.
6.Keep watching
- Mailing list: the security announcements list is open to everyone and, according to
SECURITY.md, usually gives one to two days' notice of severe fixes, without guarantee. For open source users it is the only advance notice we have found. - Advisories: follow the GitHub advisories of
BerriAI/litellmand CISA's KEV catalogue. - Old key: the command below counts the entries in the transparency log. If the number rises above 2,184, someone has used the retired key.
- Dates: check LiteLLM's commitments on 15 November, 30 November, 31 December and 31 January, and the LTS pilot in early December.
curl -fsS https://rekor.sigstore.dev/api/v1/index/retrieve -H 'Content-Type: application/json' -d "{\"publicKey\":{\"format\":\"x509\",\"content\":\"$(base64 -w0 litellm-cosign-old.pub)\"}}" | python3 -c 'import json,sys; n=len(json.load(sys.stdin)); print(n, "log entries:", "as expected" if n==2184 else "CHECK: new entries for the retired key")'
Lessons for your own organisation
October is not peculiar to LiteLLM. The same chain can hit any organisation that builds software. The following points draw on LiteLLM's report and measures:
- Revoke, do not just delete: a published key is burned, even if the file is gone after three hours. Track it in a ticket that closes only when revocation is confirmed.
- No personal tokens in services: a GitHub CLI token has no place in a service or a CI secret. Automations run as a GitHub App or with a short-lived, narrowly scoped token.
- Everyday accounts are never owners: keep owner accounts apart from daily work. An agent running on a developer's machine can read everything there, so the account there should be able to do only everyday things.
- Secrets for protected branches only: the throwaway branches worked because workflows reached the secrets on every push. Environments with branch rules close this route for stolen tokens without owner rights.
- Keep internal services off the net: experimental services appear quickly and often carry powerful credentials. Put them behind a proxy with authentication.
- Exceptions are moments of danger: the shortcut for backports opened the most convenient route. Give exceptions an expiry date and an alert.
- Alert on overrides: a rejected push followed five seconds later by an override of branch protection is a clear signal. The audit log recorded it; LiteLLM is only now setting up alerts for it.
Our assessment
LiteLLM is not unusable today, but nor is it a component to trust unchecked. In the project's favour is its openness: it corrected its own misjudgement, published commits, times and deadlines, and credited those who reported the problem. Against it stand two compromises in seven months, three flaws in the KEV catalogue and the fact that the most important countermeasures are not due to take effect until the end of December and January. We have not examined here whether another gateway would be more secure overall. We would treat LiteLLM like any component holding many high-value keys: isolated, with no free route outwards, a fixed digest, a cooldown for ordinary updates and a fast lane for security fixes. The most important single measure is blocking outbound traffic. It works regardless of how the next malware reaches the image.
Frequently asked questions
What happened to LiteLLM in March and October 2026?
On 24 March 2026 the malicious versions 1.82.7 and 1.82.8 appeared on PyPI after a compromised Trivy scanner in CI had captured static release credentials. On 21 October 2026 version 1.107.0 appeared on PyPI and in the Docker registries: a key published by accident in May and never revoked had given the attacker the token of a GitHub organisation owner, which was used to point the project's own release pipeline at a fork. Both times the malware stole credentials.
Was the official Docker image affected?
Not in March, because the proxy image pins its dependencies and did not use the malicious packages. In October it was: the tags v1.107.0, latest, main-latest and main-stable pointed to the malicious image from 11:46:56 UTC on 21 October, on GHCR until 13:51 UTC at the latest and on Docker Hub until 14:20 UTC. Anyone pinned to an older version by a fixed tag or digest who did not upgrade was not affected.
Would cosign have prevented the October attack?
No. The malicious images went through the real pipeline and carried a valid signature from the key in use at the time, so cosign verify would have passed them. A signature proves origin from the pipeline, not that the content is harmless. The build source in the SLSA provenance, which named the fork Berri-AI/litellm, would have stood out.
Can I still trust signatures made with the old cosign key?
According to LiteLLM, only on images published before the v1.107.0 release on 21 October 2026. Because LiteLLM assumes the private key was exposed, it should be removed from all verification policies. Limit any exceptions to individual digests and check the transparency log timestamp. The exfiltration took place on 10 and 12 October, which is why we recommend moving quickly to newly signed versions.
Which LiteLLM version should I run?
As of 4 November 2026, 1.108.0 and 1.106.7 are the newest stable versions. Available for a little longer are 1.106.6 and 1.105.7 from 28 October and 1.104.8 and 1.103.10 from 27 October. All of them contain the fix for GHSA-w4c7-34wj-hqm8. Version 1.106.2, named in the incident report, is clean but still signed with the old key and older than these fixes.
What do I do if 1.107.0 ran on my systems?
Treat the environment as compromised and do not start Python there, not even pip, because every start runs the malware again. From the shell, delete cook.pth, cook.py and sitecustomize.py from site-packages along with their pyc files and kill the daemon holding /tmp/remote_code_loader.lock; rebuilding the system is better. Then rotate every secret within reach: instance roles, provider keys, master and virtual keys, the database password and everything in environment variables.
Should I move to the 1.108 LTS line?
You can, but do not read it as a support commitment. The pilot runs for one month, and the announcement names fixes for LLM translation and cost tracking plus new endpoints, but no security fixes, and does not say what happens afterwards. Move if an upgrade is due anyway, keep a line change well rehearsed, and reassess the terms in early December.
Did the stolen tokens come from Claude Code or a patched vulnerability?
No. Both appeared in the first version of the incident report of 21 October and were widely quoted. According to the root cause analysis of 23 October, the first token came from the API of the LiteLLM Agent Platform, reached with the key leaked in May. LiteLLM clarified on 24 October that its observation about tokens in Claude Code responses was not the attack path and that it was looking into it further with Anthropic. LiteLLM described the patched vulnerability as an incorrect conjecture.
Sources
External sources, retrieved on 4 November 2026 (open in a new tab). Our own measurements date from the same day; we queried the public Rekor, GHCR, Docker Hub, PyPI and GitHub APIs.
- LiteLLM, The attack chain behind the v1.107.0 LiteLLM release (23 Oct 2026)
- LiteLLM, v1.107.0 incident post with key rotation (21 Oct 2026, updates to 30 Oct)
- LiteLLM, What we are changing after October 21 (30 Oct 2026)
- LiteLLM, Security Update: Suspected Supply Chain Incident (24 Mar 2026)
- LiteLLM, Security Townhall Updates (27 Mar 2026)
- LiteLLM, Announcing CI/CD v2 (30 Mar 2026)
- LiteLLM, Docker Image Security Guide
- LiteLLM, release notes v1.106.3, v1.105.4 and v1.103.8
- LiteLLM, Release cadence changes and an LTS version pilot (2 Nov 2026)
- LiteLLM, LTS pilot
- LiteLLM, Version support
- LiteLLM, Release Cycle
- LiteLLM, Version support: the four most recent stable lines (20 Jun 2026)
- LiteLLM, Introducing the LiteLLM Private Registry (27 Oct 2026)
- LiteLLM, October Townhall Updates (23 Oct 2026)
- LiteLLM, Vulnerability Disclosures and Ongoing Hardening, with the start of the bug bounty programme (3 Apr 2026)
- GitHub, issue #47826 with Upwind's finding and statements by LiteLLM
- GitHub, issue #48215: reason for the key rotation
- GitHub, issue #49052: unverified rotation commit
- GitHub, pull request #48103: rotating the cosign key
- GitHub, litellm-docs pull request #2745: fingerprint and verify commands
- GitHub, litellm-docs pull request #2758: LTS pilot and release day
- GitHub, LiteLLM releases
- GitHub, LiteLLM security advisories
- GitHub, GHSA-w4c7-34wj-hqm8
- GitHub, GHSA-7hp6-4w63-5g45
- GitHub, LiteLLM's SECURITY.md
- Socket, Secret-Stealing Workflows Ran 11 Days Before Supply Chain Attack (23 Oct 2026)
- Wiz, LiteLLM Compromised, Steals Credentials
- StepSecurity, litellm 1.107.0 Compromised on PyPI and Docker
- Datadog Security Labs, LiteLLM supply chain compromise (October)
- Datadog Security Labs, Tracing the TeamPCP supply chain campaign (March)
- Help Net Security, LiteLLM hit by second supply chain attack this year
- Sysdig, CVE-2026-42208: targeted SQL injection after 36 hours
- CISA, KEV catalogue (mirror cisagov/kev-data, as of 3 Nov 2026)
- pip documentation, --uploaded-prior-to
- uv documentation, exclude-newer
- GitHub Docs, Dependabot: cooldown
- Sigstore, public Rekor transparency log
Check, isolate and cleanly update your AI gateways
You run LiteLLM or another AI gateway and want to know whether you were affected and how to secure it from now on? We review your instance, rotate keys, set up signature verification and egress rules and support the updates, vendor-independent and GDPR-compliant, with data centres in Germany and Finland.
This article is for general information and does not replace a case-by-case assessment. Versions, digests and commands refer to the stated date and need adapting to your environment. Passages marked as an assessment or recommendation reflect our own evaluation. As of November 2026.