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: litellm 1.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: litellm 1.107.0 on PyPI and the Docker tags v1.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:

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.

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.

Six steps of the attack chain: on 27 May an admin key lands in a public repository and is never revoked. On 10 October the Agent Platform hands over an organisation owner's token. On 10 and 12 October CI secrets leak, including two maintainer tokens. On 19 October release approval is relaxed. On 21 October the release workflow builds from the fork Berri-AI/litellm and 1.107.0 goes live on PyPI, GHCR and Docker Hub. The pipeline signs the result itself: cosign and Trusted Publishing are valid, and only the provenance names the foreign source.
Figure 1: from a leaked key to a validly signed malicious release.

The chronology, all times in UTC:

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 2026October 2026
Point of entrycompromised dependency running in CIleaked API key of an experimental internal service
What the attacker heldstatic release credentials from environment variablesan organisation owner's token, then more through throwaway workflows
Role of the pipelinenone, direct publishing with stolen keysbuilt, signed and published foreign source code through the normal path
Artefactsunsigned, outside the pipelinevalidly signed, valid Trusted Publishing origin
AffectedPyPI onlyPyPI and Docker images including floating tags
Availableabout 40 minutes until quarantinePyPI 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

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 GHCROld keyNew keyTransparency log entry (UTC)
v1.106.2validinvalid21 Oct, 10:47:58
v1.106.3invalidvalid24 Oct, 09:26:57
v1.106.7invalidvalid4 Nov, 04:27:30
v1.108.0invalidvalid4 Nov, 03:33:29
v1.107.0, index 1bbcb1443bc9…Image gone: HTTP 404 on GHCR and Docker Hub21 Oct, 11:47:52 (GHCR) and 11:48:00 (Docker Hub), old key

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

What remains open

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:

DateAdvisorySeverityWhat it is aboutFixed in
20 AprGHSA-r75f-5x8p-qvmc
CVE-2026-42208
criticalSQL injection in API key verification, reachable without login. In the KEV catalogue since 8 May.1.83.7
21 AprGHSA-v4p8-mg3p-g94g
CVE-2026-42271
highCommand execution for logged-in users through MCP stdio test endpoints. In the KEV catalogue since 8 June.1.83.7
28 MayGHSA-4xpc-pv4p-pm3w
CVE-2026-49468
criticalAuthentication bypass via the Host header1.84.0
30 JunGHSA-7488-6r32-c95q
CVE-2026-59822
highMCP authentication bypass through the OAuth2 passthrough. In the KEV catalogue since 2 September.1.84.0
30 SepGHSA-7hp6-4w63-5g45
CVE-2026-114612
critical (9.9)From internal user to proxy admin and command execution, because one key served two purposes1.100.4, 1.101.3, 1.102.2, 1.103.1
27 OctGHSA-w4c7-34wj-hqm8critical (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

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:

DeadlineCommitments (shortened)
completeRelease 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 2026Alert 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 2026Okta 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 2026Restrict 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 2027Automations 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

ArtefactWindow (UTC)Indicators
PyPI litellm 1.82.7, 1.82.824 Mar, 10:39 to 16:00litellm_init.pth, ~/.config/sysmon/sysmon.py, traffic to models.litellm[.]cloud and checkmarx[.]zone
PyPI litellm 1.107.021 Oct, 11:39:51 to 13:23cook.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/litellm21 Oct, 11:46:56 to 14:20Tags v1.107.0, latest, main-latest, main-stable, index 1bbcb1443bc9…
GHCR berriai/litellm, -database, -non_root21 Oct, 11:46:56 to 13:51 at the latestThe 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.

BashTraces on the host and in containers (there with docker exec)
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)"
BashLocal images against the published v1.107.0 digests
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"

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 GHCRDigest on 4 NovNote
v1.108.0, latest, main-stablesha256:c560d317136880ea…First LTS line, released on 4 Nov
v1.106.7sha256:be24d7da11f4063c…released on 4 Nov
main-latest, v1.109.0-rc.1sha256:030121401c60d732…Release candidate, see below
v1.106.2sha256:7294b90f868c5c38…old key, predates the malicious version
v1.107.0HTTP 404removed from GHCR and Docker Hub

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.

BashPin the key and verify the image
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.

BashBuild source in the SLSA provenance (needs docker buildx)
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:

BashOld key: signature time from the log
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

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.

ConfigurationCooldown in pip, uv and Dependabot
# 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

BashNew entries by the old key in the transparency log
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:

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.

IT security with Nokkela

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.

Enquiry More on nokkela.network

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.