Guides ·
LiteLLM 1.107.0 supply-chain compromise: how to find affected copies on AWS, rebuild clean and rotate cloud and LLM keys
On 21 October 2026 a malicious LiteLLM 1.107.0 was published to PyPI and to LiteLLM's Docker Hub and GHCR images. It steals cloud, CI/CD and LLM provider credentials when Python starts, even if nothing imports LiteLLM. This guide covers how to find affected copies on AWS, rebuild clean, rotate IAM, Secrets Manager and Amazon Bedrock credentials, look for misuse, and what CERT-In advisory CIAD-2026-0053 asks for.
By Upvantix team
On 21 October 2026, a malicious LiteLLM 1.107.0 release, litellm==1.107.0, was published to PyPI. If your teams run LiteLLM on AWS, treat any environment that installed it as compromised. LiteLLM's incident post says the package was live from 11:39 to 13:23 UTC, which is 17:09 to 18:53 IST. The Docker tags v1.107.0, latest, main-latest and main-stable pointed to compromised images from 11:46 UTC, 17:16 IST. They stayed on GHCR until 13:51 UTC, 19:21 IST, and on Docker Hub until 14:20 UTC, 19:50 IST. LiteLLM says the official v1.107.0 source tag in GitHub does not contain the malicious files. The artifacts were built from a lookalike repository, Berri-AI/litellm.
The wheels add cook.pth, cook.py and sitecustomize.py to site-packages. Any Python start in that environment runs the payload, even if nothing imports LiteLLM. It targets cloud credentials for AWS, Azure and Google Cloud, SSH and GPG keys, CI/CD secrets, browser sessions and AI development-tool tokens. On LiteLLM proxy hosts it can also reach stored LLM provider keys through DATABASE_URL. A second component can fetch and run more code.
CERT-In advisory CIAD-2026-0053, issued on 23 October 2026, tells teams to identify affected systems, isolate them while preserving evidence, and rebuild from verified clean images. They should also purge caches, mirrors and registries, reinstall a verified clean release, and rotate every reachable credential from a trusted, clean environment.
On AWS, that means four steps. Find the package and image digests across Amazon ECR, Amazon EC2, AWS Lambda and build agents. Rebuild rather than clean in place. Revoke role sessions and rotate IAM access keys, AWS Secrets Manager secrets and Amazon Bedrock API keys. Then check AWS CloudTrail and Amazon GuardDuty for use of stolen credentials.
What happened to LiteLLM 1.107.0
LiteLLM is a Python SDK and proxy that sits between applications and LLM providers. LiteLLM's incident post lists the affected artifacts: all seven litellm==1.107.0 wheels on PyPI, and the four Docker Hub and GHCR tags above. On Docker Hub, the tags pointed to the compromised image index sha256:1bbcb1443bc962e45f5aad53fe3d2c30600e0379715fb6c664cdd3ac126c339e. The post lists separate digests for the litellm-database and litellm-non_root images on GHCR. Check the post for those. The artifacts have since been removed from PyPI, Docker Hub and GHCR.
LiteLLM's attack-chain report, published on 23 October 2026, explains the root cause. An administrative key for an internal, experimental LiteLLM Agent Platform had been committed to a public repository and was still valid more than four months later. On 10 October 2026, the attacker used it to extract a GitHub organization owner's GitHub CLI OAuth token. That token was then used to change the release workflow so it built from the lookalike fork.
GitHub issue 47826 notes that the reporters "did not inspect the v1.107.0 Docker images", and CERT-In describes them as "reportedly compromised". Treat any container that ran the compromised digest as affected.
Why "we never import LiteLLM" doesn't protect you
Python processes .pth files and tries to import sitecustomize while the interpreter starts. cook.pth contains import cook, so the stealer runs on every Python start in that environment. That includes CI agents, test machines, notebooks and unrelated Python applications. It also includes running pip install or pip show inside the suspect environment. Microsoft Security Research, in its analysis of 23 October 2026, says investigators "should not start Python or pip inside a suspect environment".
The files sit outside the litellm package directory, so removing the package or the image tag is not enough. Microsoft says removing the package or a release tag "is not sufficient recovery".
The second component, sitecustomize.py, starts a background loader on Unix-based systems. It reads an attacker-controlled file on GitHub every hour and can download and run Python code. Microsoft reports that the file was empty when researchers checked it, and that no second-stage retrieval was confirmed. Because the file can be changed, the loader can be re-armed.
Step 1: Find every affected copy on AWS
- Lockfiles and manifests. Search
requirements.txt,poetry.lock,pyproject.tomland other manifests forlitellm==1.107.0. Also check build logs for unpinnedlitellminstalls on 21 October 2026. - Container images. Compare image digests in your Amazon ECR repositories, Amazon ECS task definitions and Kubernetes pod specs against the compromised index digest. Look for the
latest,main-latest,main-stableandv1.107.0tags pulled during the window. Amazon ECR enhanced scanning, which uses Amazon Inspector, scans images for both operating system and programming language package vulnerabilities. Basic scanning covers operating system packages only. We found no AWS statement that these scans flag LiteLLM 1.107.0, so compare digests directly. - Software inventory. Amazon Inspector can export an SBOM, in CycloneDX 1.4 or SPDX 2.3 format, for the EC2 instances, ECR images and Lambda functions it monitors. Search the export for
litellmversion 1.107.0. A clean SBOM is not proof on its own, because it covers only resources Inspector actively monitors. - Mirrors and caches. Check AWS CodeArtifact or any other internal PyPI proxy, plus pip and uv caches on build agents.
- File evidence, checked from outside the environment. Look for
cook.pth,cook.py,sitecustomize.py,litellm-1.107.0.dist-info,/tmp/remote_code_loader.lockand/tmp/.pc_once_72129118c59f5636c0bb. LiteLLM's post says finding one confirms exposure, but not finding one does not prove the environment is clean. GitHub issue 47826 says the marker file is written only after a successful exfiltration upload, and LiteLLM's post says container and temporary-file cleanup removes it.
The OSV record MAL-2026-2144 lists 1.107.0 as malicious. Its indicators can feed your own searches.
Step 2: Contain and rebuild clean
- Isolate first. CERT-In asks teams to isolate suspected hosts and containers, "preserving relevant logs and forensic evidence before making changes".
- Investigate from a known-clean machine. Use trusted tools from outside the environment, and do not run Python or pip inside it.
- Rebuild, don't clean in place. CERT-In asks teams to rebuild or redeploy containers from a verified clean image and not to rely solely on in-place cleanup. LiteLLM's post says rebuilding images and virtual environments from scratch is better than deleting files.
- Pin what you rebuild. Pin LiteLLM by version and hash, and pin container images by digest, not by tag.
- Purge the bad artifacts. Remove 1.107.0 and the compromised images from local caches, internal mirrors and container registries.
On the version to reinstall, CERT-In's advisory says: "The supplied analysis identifies 1.106.2 as a clean version; verify its integrity and suitability before pinning it." LiteLLM's incident post also asks users to pin 1.106.2. As of 30 October 2026, PyPI lists later releases, 1.106.3 to 1.106.6, published between 24 and 28 October 2026. CERT-In's advisory does not name them. Separately, LiteLLM's GitHub security advisory GHSA-w4c7-34wj-hqm8, published on 27 October 2026 (UTC), rates a flaw on proxies running with an Enterprise license as critical and lists 1.106.5 as the patched version in the 1.106 line. It says open source deployments without a license are not affected. Check LiteLLM's current guidance before choosing one.
Step 3: Rotate credentials on AWS, from a clean machine
Do every rotation from a trusted machine, never from an affected host. Microsoft advises revoking sessions rather than assuming that rotating a key invalidates every active token.
| Credential | Where it lives | AWS action as documented | Source |
|---|---|---|---|
| EC2 instance, ECS task or other IAM role | Instance metadata, task credentials | In the IAM console, open the role, choose the Revoke sessions tab, then Revoke active sessions. IAM attaches the AWSRevokeOlderSessions policy, which denies credentials issued before that time. It can't be used on a service-linked role. | AWS IAM User Guide |
| IAM user access keys | Config files, environment variables | Create a second access key, update all applications and validate them, set the old key to inactive, validate again, then delete the inactive key. | AWS Security Blog |
Secrets Manager secrets, for example a stored DATABASE_URL password | AWS Secrets Manager | For a secret with rotation configured, choose Rotate secret immediately. AWS says you can only rotate a secret that has rotation configured. | AWS Secrets Manager User Guide |
| Long-term Amazon Bedrock API keys | Environment, config | Set the key to inactive, reset it, or delete it. Through the API, authenticate with AWS credentials, not a Bedrock API key. | Amazon Bedrock User Guide |
| Short-term Amazon Bedrock API keys | Generated from a session | These can't be deactivated, reset or deleted individually. Invalidate the session that generated them, or deny the identity bedrock:CallWithBearerToken and bedrock-mantle:CallWithBearerToken. | Amazon Bedrock User Guide |
LLM provider keys, LiteLLM master_key, salt_key and virtual keys | LiteLLM proxy database and config | Rotate with each provider and follow LiteLLM's key-management procedures. | CERT-In, LiteLLM |
| CI/CD secrets, repository and registry tokens, SSH and GPG keys, AI coding-tool tokens, browser sessions | Build agents, developer machines | Rotate or revoke each one with its issuer. | CERT-In |
Rotate LLM provider keys even if their usage looks normal. On proxy hosts, the collector targeted the database tables that store them.
Step 4: Look for use of stolen credentials
- CloudTrail Event history. Look up events by the AWS access key attribute, or by user name. Event history covers management events in a Region for the last 90 days.
- The role's own trail. LiteLLM advises checking CloudTrail "for
GetCallerIdentityfrom the instance role around install time, then for use of the role's credentials from outside your infrastructure." The GitHub issue notes that the stealer validates stolen role credentials with STSGetCallerIdentity. - GuardDuty. The
UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWSfinding reports EC2 instance credentials used from an external IP address.UnauthorizedAccess:IAMUser/ResourceCredentialExfiltration.OutsideAWScovers credentials from a Lambda function or ECS task. These findings flag credential misuse. They do not identify LiteLLM. - Network logs. Search DNS, proxy, firewall, container and CI/CD logs for
www(.)litellm(.)dev, requests to/codepy, and reads of the GitHub repositoryletters9813/pythonclient-test. - The proxy itself. Review LiteLLM proxy database access and upstream provider usage for unexpected calls.
Do you need to report it to CERT-In?
The CERT-In Directions of 28 April 2022, issued under section 70B(6) of the IT Act, say service providers, intermediaries, data centres, body corporate and Government organisations "shall mandatorily report cyber incidents as mentioned in Annexure I to CERT-In within 6 hours of noticing such incidents". Annexure I lists, among others, "Malicious code attacks", "Unauthorised access of IT systems/data", "Data Breach", "Data Leak", and attacks or suspicious activity affecting cloud computing systems and AI and machine learning systems.
Whether your exposure is reportable depends on what ran and what was taken. Ask your CISO or legal team. For the AWS side, see our guides on CERT-In log retention and 6-hour reporting on AWS and on DPDP breach reporting on AWS.
Harden for the next one
- Use hash-pinned lockfiles, verify package and image provenance, and deploy images by digest rather than floating tags.
- Admit packages to internal mirrors only after review. CodeArtifact package origin controls protect against dependency substitution, but they don't stop a malicious version from a legitimate upstream, so keep pinning.
- Restrict outbound internet access from build agents and AI gateway hosts to what they need.
- Give gateway hosts least-privilege, short-lived identities. Our guide on hardening AWS secrets and IAM after CIAD-2026-0049 covers this.
How Upvantix helps
Upvantix is an AWS Select Tier Services Partner. After you have contained the incident, a security posture assessment can help. We review architecture and controls, then prioritize material remediation actions. Our AWS Security & Cost Optimization work also includes identity, network and data-control assessment; configuration, logging and detection review; a risk-ranked remediation and optimization backlog; and approved implementation and validation. AWS Security Hub, Amazon GuardDuty, Amazon Inspector, AWS Config, AWS IAM Access Analyzer and AWS KMS may be used where appropriate. This is a posture review, not an incident-response or forensics service, and we do not give legal advice on reporting.
Talk to us about an AWS security posture review after the LiteLLM incident.
Common questions about the LiteLLM 1.107.0 compromise on AWS
Which LiteLLM versions were compromised?
All seven litellm==1.107.0 wheels on PyPI, live from 11:39 to 13:23 UTC on 21 October 2026. Also the Docker Hub and GHCR tags v1.107.0, latest, main-latest and main-stable, from 11:46 UTC until 13:51 UTC on GHCR and 14:20 UTC on Docker Hub. The OSV record MAL-2026-2144 also lists 1.82.7 and 1.82.8, from March 2026.
Am I affected if my code never imports LiteLLM?
Yes, if 1.107.0 was installed in that environment. The wheels place cook.pth and sitecustomize.py in site-packages, and Python runs them at interpreter start. Any Python process there, including pip, CI jobs and other applications, can trigger the stealer. CERT-In says the files can run without an explicit import, and Microsoft says starting Python could be enough.
Which LiteLLM version should I reinstall?
CERT-In's advisory says the supplied analysis identifies 1.106.2 as a clean version, and asks you to verify its integrity and suitability before pinning it. LiteLLM's incident post also says to pin 1.106.2. A later LiteLLM advisory, GHSA-w4c7-34wj-hqm8, affects Enterprise-licensed proxies before 1.106.5. Check LiteLLM's current guidance and pin by hash.
What does CERT-In advisory CIAD-2026-0053 ask organisations to do?
It asks teams to identify affected systems, isolate them while preserving evidence, and rebuild from verified clean images. They should remove compromised artifacts from caches, mirrors and registries, and reinstall a verified clean release. Then they should rotate cloud, CI/CD, SSH, AI-tool and LLM provider credentials, including LiteLLM's master_key and salt_key, from a trusted, clean environment.
Which AWS credentials should I rotate after the LiteLLM compromise?
Revoke active sessions on every IAM role the host or task used, and rotate IAM user access keys. Rotate Secrets Manager secrets, such as a stored DATABASE_URL password. Deactivate, reset or delete long-term Amazon Bedrock API keys, and invalidate the sessions behind short-term ones. Rotate LLM provider keys and LiteLLM's master and virtual keys too.
How do I check CloudTrail for misuse of stolen AWS keys?
In CloudTrail Event history, look up events by the AWS access key attribute, or by user name. Event history covers management events from the last 90 days. LiteLLM advises looking for GetCallerIdentity from the instance role around install time. In GuardDuty, check for the InstanceCredentialExfiltration.OutsideAWS finding and its ECS and Lambda equivalent.
Can I just pip uninstall LiteLLM?
No. The startup files sit outside the litellm package directory, so uninstalling the package can leave them behind. Running pip inside the environment starts Python, which runs the payload again. Microsoft says removing the package is not sufficient recovery. Rebuild images and virtual environments from scratch, then rotate credentials from a clean machine.
Do I have to report a LiteLLM compromise to CERT-In within 6 hours?
CERT-In's Directions of 28 April 2022 require service providers, intermediaries, data centres, body corporate and Government organisations to report the incident types in Annexure I within 6 hours of noticing them. The list includes malicious code attacks, unauthorised access and data breaches. Whether your exposure qualifies is a question for your CISO or legal team.