Anatomy of a Software Supply Chain Breach: How a Leaked Master Key Compromised LiteLLM Version 1.107.0

In the fast-paced world of artificial intelligence and large language model (LLM) orchestration, convenience often battles with security. In October 2026, that delicate balance tipped dramatically for the open-source project LiteLLM. A single administrative oversight—an unrevoked master key accidentally committed to a public repository months prior—paved the way for a sophisticated software supply chain attack.

The incident culminated in the distribution of a malicious version of the popular Python package (version 1.107.0), exposing thousands of developers, enterprises, and upstream artificial intelligence pipelines to credential theft, data exfiltration, and persistent backdoors. Security researchers from multiple application security firms, alongside Microsoft and LiteLLM maintainers, have since pieced together a chilling timeline of how a minor configuration error snowballed into a major security crisis.


The Main Facts: What Happened at LiteLLM?

At its core, the LiteLLM supply chain compromise is a masterclass in how threat actors exploit overlooked administrative permissions. The breach enabled an unknown external attacker—operating from IP address 69.48.229[.]143—to compromise the LiteLLM Agent Platform, infiltrate internal repositories, and inject malicious code into the official Python Package Index (PyPI) release channel.

The compromised iteration, LiteLLM version 1.107.0, carried severe payloads designed to operate autonomously. Unlike typical compromised packages that require explicit import calls to execute, this version utilized Python startup hooks. This meant that simply initializing a Python environment in an affected system could trigger the embedded malware, even if the application never explicitly imported or utilized LiteLLM.

Once activated, the payload executed two primary routines: a comprehensive credential-harvesting module targeting developer toolchains, AI provider keys, cloud secrets, and web browsers; and a Unix-oriented background backdoor designed to poll an attacker-controlled server (litellm[.]dev/healthcheck) every hour for arbitrary code execution.


Chronology of an Attack: From GitHub Leak to PyPI Compromise

Understanding how the attacker gained such deep access requires tracing a trail of breadcrumbs stretching back nearly five months before the malicious release went live.

May 27, 2026: The Original Sins

The genesis of the breach occurred when a configuration file was committed to the public LiteLLM-Labs/lite-harness repository (harnesses/opencode/opencode.json). Inadvertently embedded within this file was the master key to a deployment of the LiteLLM Agent Platform, an open-source orchestration tool utilized by the project team.

Leaked LiteLLM Master Key Let Attackers Steal GitHub Tokens and Hijack Release Pipeline

According to LiteLLM developers Oliver Jensen and Mateo Wang, the error was quickly identified, and the commit was force-pushed over to hide the text. While the team recognized that the exposed keys required revocation, the master key itself was mistakenly left active.

October 10, 2026: Initial Infiltration and Branch Manipulation

Dormant for months, the unrevoked master key was exploited on October 10, 2026. The threat actor used the key to break into the Agent Platform. Once inside, they extracted a GitHub CLI OAuth token. Crucially, this token was "not scoped down" and was tied directly to the GitHub organization owner’s account, granting owner-level privileges across all associated repositories.

Security firm Socket, which conducted an independent timeline investigation, discovered that the attacker began pushing malicious workflows under the radar. On October 10 at 10:11:45 p.m. UTC, the first unauthorized workflow was added to .github/workflows/cache.yml.

Rather than modifying main development branches, the threat actor utilized short-lived, transient branches named ci-tmp-<hex>. These branches were created, utilized, and deleted within minutes, effectively erasing traditional Git history and leaving minimal forensic footprints. Both workflows piggybacked on legitimate base commits to blend in with normal repository traffic.

October 12, 2026: Expanding the Data Harvest and Release Manipulation

A second malicious commit on October 12 broadened the scope of data exfiltration. Following this, the attacker turned their attention to the project’s software release pipeline.

Under standard operating procedures, building and publishing a LiteLLM release requires an authorized engineer to kick off the process, followed by an approval check locked to a physical hardware device located within the company’s office. However, to accommodate a temporary push for frequent bugfix backports earlier that week, developers had relaxed these constraints to allow any two engineers to trigger and approve a release.

Leveraging their stolen organization-owner privileges, the threat actor manipulated the deployment target to their own malicious repository. They then used one stolen token to trigger the software build and a second token to approve it, successfully injecting the malicious code into the official release channel as version 1.107.0.

Leaked LiteLLM Master Key Let Attackers Steal GitHub Tokens and Hijack Release Pipeline

Supporting Data: The Anatomy of the Stolen Secrets

Investigations by Socket and LiteLLM revealed that the malicious workflows were meticulously engineered to vacuum up an extensive array of high-value internal credentials. The workflows methodically targeted both third-party API keys and platform-specific authentication tokens.

Harvested Secrets and Infrastructure Data

The initial October 10 workflow focused on capturing GitHub tokens and API keys for:

  • The organization’s Linear workspace.
  • Internal LiteLLM deployments.
  • Together AI inference keys.
  • Identifiers and private signing keys for associated GitHub Apps.

The October 12 workflow drastically expanded this list to include:

  • AI and Cloud Credentials: API keys for Anthropic, OpenAI, AWS Bedrock, and Tavily.
  • Security Infrastructure: GitGuardian secret-scanning tenant API keys, giving the attacker potential oversight and control over alerts that might flag their activity.
  • Database and Storage Credentials: PostgreSQL connection strings, account names, passwords, and Redis endpoint addresses, ports, and authentication tokens.
  • Browser Sessions: E2E_LINEAR_STORAGE_STATE_B64, which contains serialized browser session states used by Playwright for end-to-end testing. Possessing this valid storage state allowed authenticated, passwordless access to the associated Linear account while entirely bypassing multi-factor authentication (MFA).

All harvested information was quietly compressed and exfiltrated to external data-collection endpoints (webhook[.]site URLs during the testing/staging phases, and later litellm[.]dev/healthcheck, a domain registered specifically for the attack on October 13, 2026).


Inside the Malicious Package: What Version 1.107.0 Does

The distribution of LiteLLM v1.107.0 via PyPI marked the most dangerous phase of the attack. Security researchers from Microsoft and various open-source malware trackers dissected the compiled wheel files and uncovered alarming execution behaviors.

Python Startup Hooks

The primary vector of persistence was the implementation of Python startup mechanisms. When Python initializes on an operating system, it can be configured to execute specific site-initialization scripts (sitecustomize.py or usercustomize.py). The compromised package leveraged these mechanisms to ensure that the malicious payload executed the moment the Python interpreter spun up.

As the Microsoft Security Research team noted in their technical breakdown:

Leaked LiteLLM Master Key Let Attackers Steal GitHub Tokens and Hijack Release Pipeline

"Because the startup files resided outside the LiteLLM application directory, removing only the application files could leave the malicious startup components behind."

This architectural design meant that developers who installed the package—even if their codebase never instantiated a LiteLLM client or called an LLM function—were still actively running the credential harvester in the background.

Comprehensive Local Credential Scraping

Once active, the malicious script initiated a deep scan of the host environment. It targeted:

  • Local SSH keys and configuration files.
  • Git and GitLab global configuration and access tokens.
  • System environment variables containing sensitive strings.
  • Package manager tokens and authentication files, including those for npm, PyPI, pip, Yarn, Maven, Gradle, Composer, RubyGems, and Cargo.

The Unix-Oriented Backdoor

For persistent access, the malware deployed a Unix-oriented background process. This background runner functioned as a command-and-control (C2) beacon, querying the attacker’s infrastructure every 60 minutes to fetch and execute arbitrary scripts on the host system. This gave the threat actor a reliable pivot point into corporate developer networks, staging grounds, and enterprise cloud environments.


Official Responses and Remediation Efforts

In the wake of the disclosures, the LiteLLM team moved swiftly to contain the fallout, issue transparency reports, and revise their internal security architecture.

Oliver Jensen publicly acknowledged that their initial assumptions regarding the attack vectors—such as believing the GitHub CLI tokens were exclusively stolen from internal log files—were proven incomplete as deeper forensics emerged from firms like Socket.

In response to the multi-layered breach, LiteLLM initiated a comprehensive security overhaul:

Leaked LiteLLM Master Key Let Attackers Steal GitHub Tokens and Hijack Release Pipeline
  1. Global Credential Revocation: The company embarked on a massive undertaking to invalidate and rotate every single token, API key, and authentication secret associated with internal systems, developer workstations, and vendor platforms.
  2. Pipeline Hardening: The temporary relaxation of release-approval workflows has been permanently rolled back. Strict physical hardware locks and multi-person authorization gates for software builds have been reinstated.
  3. Scoped Token Enforcement: Moving forward, organization-wide OAuth tokens have been restricted, and principle-of-least-privilege (PoLP) access controls are being aggressively implemented across all GitHub Actions and automation workflows.

Implications for the AI Ecosystem

The LiteLLM supply chain compromise serves as a stark warning flare for the broader artificial intelligence and software development communities. As enterprises increasingly adopt Large Language Model gateways, open-source orchestration tools, and automated agent platforms, these components become high-value targets for advanced threat actors.

Several critical takeaways emerge from this incident:

  • The Danger of Unrevoked Secrets: A leaked key is a ticking time bomb. Force-pushing a commit to hide a secret in a public GitHub repository is entirely insufficient if the underlying credential itself is not immediately revoked and destroyed.
  • The Risk of Over-Privileged Automation: CI/CD pipelines and AI agent platforms often require broad administrative permissions to function efficiently. When these systems lack fine-grained scoping, a single compromise can grant an attacker keys to the entire corporate kingdom.
  • The Evolution of Supply Chain Malware: Modern supply chain attacks no longer rely solely on malicious code hiding inside package functions. The use of Python startup hooks demonstrates that attackers are finding innovative ways to achieve execution persistence independent of the target application’s source code.

For developers and system administrators running environments connected to AI toolchains, the incident underscores the urgent need for continuous secret scanning, rigorous dependency auditing, and strict zero-trust architectures across internal development operations.

Back To Top