SANDCLOCK Supply-Chain Attack: How the LiteLLM Breach Turned a Popular AI Gateway Into a Credential-Stealing Trap

Listen to this Post

Featured ImageIntroduction: When Trusted AI Infrastructure Becomes the Attack Surface

The modern AI ecosystem is built on layers of open-source software, cloud services, APIs, package repositories, CI/CD pipelines, and developer credentials. That architecture makes AI development faster and more accessible, but it also creates an uncomfortable reality: compromising one trusted component can give attackers access to an enormous number of downstream environments.

The reported LiteLLM supply-chain attack, attributed to the threat actor group TeamPCP, is a powerful example of that danger. According to the incident reporting summarized here, attackers compromised maintainer credentials associated with the popular open-source AI gateway and published malicious LiteLLM versions 1.82.7 and 1.82.8 to PyPI around March 2026.

The malicious code allegedly deployed a backdoor known as SANDCLOCK, designed to steal valuable credentials from developer and cloud environments. The potential consequences were far greater than compromising a single application. Because LiteLLM is used to connect applications with numerous large language model providers, including OpenAI, Anthropic, Google Gemini, and local models such as Ollama, the attack potentially reached deep into the infrastructure used to build and operate AI systems.

Resecurity reportedly obtained a 150GB archive attributed to the campaign. The accompanying victim manifests allegedly identified 898 compromised GitHub owners across 2,038 repositories, while the broader incident assessment suggested that more than 2,500 organizations and hundreds of thousands of CI/CD environments may have been exposed.

The most disturbing element is not simply the number of victims. It is the possibility that some organizations may have installed a compromised package without immediately realizing that their credentials had been harvested.

That is what makes software supply-chain attacks so dangerous.

LiteLLM: Why This Open-Source Component Matters

A Gateway Across the AI Ecosystem

LiteLLM is designed to simplify communication between applications and multiple AI model providers. Instead of developers building separate integrations for every model provider, an AI application can use a unified interface to interact with different APIs.

This makes the project extremely attractive to developers building AI applications, internal automation systems, agents, experimentation platforms, and production infrastructure.

But convenience comes with a security trade-off.

When one component becomes a common dependency across thousands of organizations, compromising that component can provide attackers with an opportunity to reach many environments simultaneously.

The TeamPCP Attack Explained

Compromised Maintainer Credentials

According to the supplied incident report, TeamPCP obtained access to maintainer credentials associated with LiteLLM.

The attackers then allegedly used those credentials to publish malicious versions 1.82.7 and 1.82.8 to PyPI.

This is a classic software supply-chain strategy.

Instead of attacking every company individually, the attacker compromises something that those companies already trust.

SANDCLOCK: The Backdoor Inside the Supply Chain

From Package Installation to Credential Theft

The reported SANDCLOCK backdoor transformed the compromised package into a credential-stealing mechanism.

Once malicious code reaches a developer workstation, build server, CI/CD runner, or cloud-connected environment, the attacker may no longer need to exploit an individual vulnerability.

The environment itself becomes the source of credentials.

GitHub tokens, cloud credentials, SSH keys, container registry credentials, Kubernetes secrets, and AI provider API keys can all become valuable targets.

The Real Prize Was Not the Source Code

Credentials Are More Valuable Than Files

A stolen source repository can be serious, but stolen credentials can be much more powerful.

An attacker holding an AWS access key may be able to interact directly with cloud resources.

A compromised GitHub token could potentially provide repository access.

An exposed SSH key may provide access to servers.

A leaked Kubernetes secret can expose workloads and internal services.

An AI provider API key can allow unauthorized model usage and potentially generate significant costs.

This turns the incident from a simple malicious-package story into a broader identity-security crisis.

898 GitHub Owners and 2,038 Repositories

The Victim List Reveals the Scale

Resecurity reportedly identified 898 distinct GitHub owners across 2,038 repositories in the victim manifests.

The distribution was heavily skewed.

According to the supplied data, 631 owners had only one affected repository, while the most heavily affected owner, Cencosud-Cencommerce, reportedly had 64 repositories involved.

That long-tail distribution is important because it suggests the attack was not limited to a small collection of enormous enterprises.

A large number of organizations may have been affected individually, sometimes through only one repository.

Major Organizations Were Allegedly Exposed

A Who’s Who of Global Enterprises

The reported victim list includes organizations such as Microsoft, Azure, IBM, NVIDIA, PayPal’s Zettle, Deloitte, Bosch, S&P Global, Elevance Health, 84.51° associated with Kroger, Adeo associated with Leroy Merlin, Kärcher, Dräger, ID.me, and 1inch.

The presence of major enterprises demonstrates why supply-chain security cannot be reduced to the security practices of a single development team.

Large organizations can maintain thousands of repositories, automated build systems, cloud accounts, third-party integrations, and developer identities.

One compromised dependency can therefore become a bridge into an enormous digital ecosystem.

2,146 Credential Records

The Numbers Tell Another Story

Resecurity reportedly enumerated 2,146 records by key name, while the actual credential values were not inspected beyond structural masking.

The composition was reportedly dominated by GitHub CI/CD identity material, accompanied by cloud credentials, container registry secrets, SSH credentials, and other high-value authentication information.

That distinction matters.

The number of credential records does not necessarily equal the number of individual people affected.

Instead, these records represent pieces of machine and developer identity infrastructure that could potentially be used to move deeper into organizational environments.

CI/CD Pipelines Became the Perfect Target

Automation Multiplies the Damage

Modern development pipelines often operate with elevated privileges because they need to build software, publish containers, deploy applications, access cloud infrastructure, and communicate with source repositories.

That makes CI/CD environments extremely attractive to attackers.

If malicious code executes inside a pipeline, it may inherit environment variables, temporary credentials, configuration files, secrets, or authentication tokens.

A developer might never see the malicious behavior.

The automated pipeline simply executes the dependency as part of the normal build process.

The Hidden Danger of Mean Time to Detection
Attackers Can Operate While Everyone Thinks Everything Is Normal

One of the most important concepts in this incident is MTTD, or Mean Time to Detect.

A supply-chain compromise can remain invisible because the malicious package may initially behave exactly as expected.

The application still starts.

The API still responds.

The deployment still succeeds.

The tests still pass.

Meanwhile, credentials may already be leaving the environment.

That creates a dangerous gap between compromise and detection.

MTTR Is Equally Important

Finding the Problem Is Only the Beginning

Even after an organization discovers that it installed a malicious package, remediation can be complicated.

Security teams must determine:

Which systems installed the package?

Which versions were deployed?

Which credentials were accessible?

Which credentials were potentially stolen?

Which repositories were accessed?

Were cloud resources contacted?

Were SSH keys exposed?

Were Kubernetes secrets accessible?

Did the attacker create persistence?

Did unauthorized deployments occur?

That is why MTTR, or Mean Time to Respond, becomes critical.

The longer remediation takes, the greater the potential blast radius.

Deep Analysis: How a LiteLLM Supply-Chain Compromise Can Escalate

Step 1: Identify Installed LiteLLM Versions

Organizations should first determine whether affected LiteLLM versions were installed anywhere in their environment.

For Python environments, teams can begin with:

python -m pip show litellm

They can also inspect dependency manifests:

grep -R "litellm" requirements.txt pyproject.toml poetry.lock uv.lock 2>/dev/null

The objective is not simply to identify a currently installed version, but to discover whether a compromised version was ever installed.

Step 2: Search Package Installation History

Security teams should review CI/CD logs and package-manager logs for historical installations.

For example:

grep -R "litellm" /var/log 2>/dev/null

In containerized environments, image histories and build logs can also provide evidence of package installation.

The investigation should cover developer laptops, build runners, ephemeral CI workers, containers, and production systems.

Step 3: Search for Suspicious Environment Variables

Credential theft frequently targets environment variables because CI/CD systems commonly expose secrets through them.

A basic local review can include:

env | sort

Security teams should specifically examine variables associated with GitHub, AWS, Google Cloud, Azure, container registries, Kubernetes, SSH, and AI providers.

However, organizations should never paste real secrets into public terminals, tickets, chat systems, or security reports.

Step 4: Inspect GitHub Authentication

Organizations should audit GitHub App credentials, personal access tokens, deploy keys, repository secrets, and unusual authentication events.

For

gh auth status

Security teams should compare authentication activity with known developer and automation activity.

Unexpected locations, unfamiliar user agents, unusual timestamps, or access involving repositories that a service normally never touches can be important indicators.

Step 5: Review Cloud Credentials

AWS environments should be examined for suspicious activity associated with exposed credentials.

For example:

aws sts get-caller-identity

This command can help determine which identity is currently being used by a configured AWS session.

It does not prove that the environment was compromised.

For an incident investigation, teams should examine CloudTrail and other relevant audit logs for unexpected API activity.

Step 6: Examine Kubernetes Secrets

Organizations running AI workloads on Kubernetes should investigate whether compromised CI/CD environments could access cluster credentials.

A basic inventory command is:

kubectl get secrets --all-namespaces

The purpose should be defensive auditing.

If credentials were potentially exposed, simply deleting a local copy is insufficient. The underlying secret should be rotated and dependent workloads should be updated.

Step 7: Rotate, Do Not Merely Revoke

The most important remediation principle is simple:

Assume exposed credentials are compromised.

Organizations should rotate affected:

GitHub App private keys

Personal access tokens

AWS credentials

Google Cloud credentials

Firebase credentials

ECR credentials

JFrog tokens

SSH keys

Kubernetes credentials

AI provider API keys

Package signing credentials

Revocation without replacement can break production systems.

Replacement without revocation leaves the attacker with the old credential.

The correct approach is controlled rotation followed by validation.

Step 8: Search for Persistence

Credential theft may be only the first stage.

Security teams should inspect:

git log --all --decorate --oneline

and review unexpected commits, workflow changes, new GitHub Actions, modified deployment scripts, unknown SSH keys, unfamiliar cloud users, and suspicious CI/CD configuration changes.

The investigation should look beyond the compromised dependency.

Why AI Supply-Chain Attacks Are Becoming More Dangerous

AI Infrastructure Has Extraordinary Connectivity

AI applications rarely operate in isolation.

A typical deployment may connect:

AI application → LiteLLM → model provider → cloud infrastructure → databases → vector stores → Kubernetes → CI/CD → GitHub.

Each connection creates another possible security boundary.

A compromise at one point can potentially expose credentials that unlock several others.

AI Provider Keys Are High-Value Targets

OpenAI, Anthropic, Google, and other AI platforms rely heavily on API authentication.

An attacker who steals an AI API key may be able to abuse it for unauthorized inference, data processing, automated agent activity, or other services depending on the permissions and account configuration.

The financial consequences can also be immediate.

A compromised API key may generate unexpected usage charges before the organization realizes anything is wrong.

Cloud Credentials Can Turn a Small Breach Into a Major Incident

Cloud environments are especially sensitive because credentials may provide access to storage, databases, compute instances, container registries, serverless infrastructure, secrets managers, and other services.

The attacker does not necessarily need to exploit another vulnerability.

They may simply authenticate legitimately with stolen credentials.

That makes identity security one of the most important defensive layers in modern infrastructure.

What Undercode Say:

1. The Dependency Is the New Perimeter

The traditional security perimeter is disappearing.

Organizations increasingly depend on thousands of external packages and services.

Every dependency therefore becomes part of the effective attack surface.

2. Trust Is Becoming a Security Vulnerability

Developers naturally trust popular open-source projects.

That trust is exactly what supply-chain attackers exploit.

The malicious code does not need to look suspicious if it arrives through a trusted update channel.

3. AI Makes the Blast Radius Larger

AI applications often connect numerous APIs and infrastructure components.

That means an AI-focused dependency can sit at a strategically valuable position inside an organization’s architecture.

4. Package Repositories Are High-Value Targets

PyPI, npm, Maven, NuGet, and other repositories have enormous downstream influence.

Compromising a maintainer account can sometimes be more efficient than attacking individual companies.

5. CI/CD Credentials Are Especially Dangerous

Build systems frequently require broad permissions.

If a malicious package executes during a build, it may inherit privileges that an ordinary developer application never receives.

6. Secrets Should Be Short-Lived

Long-lived credentials increase the consequences of supply-chain attacks.

Short-lived tokens reduce the amount of time stolen credentials remain useful.

7. Least Privilege Must Apply to Automation

CI/CD systems should not automatically receive unrestricted cloud permissions.

Each pipeline should receive only the permissions required for its specific task.

  1. AI API Keys Need the Same Discipline

Organizations sometimes treat AI API keys as less important than cloud credentials.

That is a mistake.

AI credentials can provide access to expensive services and potentially sensitive workflows.

9. Package Pinning Is Not Enough

Pinning dependencies protects against unexpected version changes, but it does not automatically protect against a malicious version that an organization intentionally installs.

The integrity of the package itself must also be verified.

10. Reproducible Builds Matter

Organizations should work toward reproducible builds and verifiable software provenance.

Knowing exactly what entered a production artifact makes investigations significantly easier.

11. SBOMs Are Increasingly Valuable

Software Bills of Materials can help security teams identify which applications depend on a vulnerable or compromised component.

Without dependency visibility, incident response becomes guesswork.

12. Detection Must Cover Developer Environments

Security monitoring often focuses on production infrastructure.

Supply-chain attacks demonstrate why developer laptops and build runners deserve serious monitoring too.

  1. GitHub Is Part of the Production Environment

For modern software organizations, GitHub is not simply a place to store source code.

It can control deployments, secrets, automation, releases, and infrastructure.

Protecting GitHub therefore means protecting production.

14. Credentials Should Be Treated as Disposable

A credential that cannot be rotated quickly is a liability.

Security architecture should assume credentials will eventually be exposed.

  1. Incident Response Must Start Before the Breach

Organizations should already know how to rotate cloud credentials, GitHub keys, SSH keys, registry tokens, and AI API keys.

Waiting until an incident occurs wastes valuable time.

16. Supply-Chain Monitoring Needs Historical Visibility

Finding the compromised package today is not enough.

Teams need to determine whether it was installed weeks or months ago.

Historical package telemetry is therefore extremely valuable.

17. MTTD Is a Competitive Security Advantage

The organization that detects credential theft in minutes is in a dramatically better position than one that discovers it after several months.

Detection speed directly influences damage.

  1. MTTR Determines How Far the Attack Travels

Once credentials are exposed, every hour of delay can increase uncertainty.

Rapid containment limits the

19. Open Source Remains Essential

The lesson is not that organizations should abandon open source.

Open source remains one of the foundations of modern software development.

The lesson is that open-source dependencies must be governed with the same seriousness as internal infrastructure.

20. Maintainer Accounts Need Strong Protection

A compromised maintainer credential can effectively become a software-distribution credential.

Strong authentication, hardware-backed credentials, signing mechanisms, and strict publishing controls can dramatically reduce that risk.

21. Package Signing Deserves More Attention

Cryptographic signatures and trusted provenance can help organizations determine whether an artifact came from an expected source.

They cannot solve every supply-chain problem, but they raise the cost of successful impersonation.

22. Dependency Updates Need Risk Scoring

Not every dependency deserves identical treatment.

A tiny utility used in an isolated environment is different from a gateway positioned between an AI application and multiple cloud services.

Critical dependencies should receive stronger validation.

23. AI Gateways Are Strategic Infrastructure

The importance of AI gateways is easy to underestimate.

They often sit between applications and multiple model providers.

That makes them attractive targets for attackers seeking broad access.

24. The Real Asset Is Identity

The SANDCLOCK scenario demonstrates a broader cybersecurity trend.

Attackers increasingly want credentials rather than destructive malware.

Identity provides access.

Access provides control.

25. Cloud Logs Become Evidence

When credential theft is suspected, cloud audit logs can help establish whether stolen identities were actually used.

This distinction is crucial for incident severity assessment.

26. GitHub Audit Logs Matter

Repository activity, authentication records, workflow changes, and token usage can reveal activity that would otherwise remain hidden.

Organizations should retain these records long enough to investigate delayed compromises.

27. Kubernetes Expands the Attack Surface

Kubernetes secrets and service-account credentials can provide access to internal workloads.

AI companies heavily using Kubernetes should treat cluster identity as a critical asset.

28. Containers Do Not Automatically Provide Isolation

A containerized build environment can still access credentials supplied to the build process.

Containerization reduces certain risks but does not eliminate credential exposure.

29. Zero Trust Applies to Developers Too

Developer machines should not automatically be trusted simply because they belong to employees.

Authentication, authorization, device posture, and behavioral monitoring all matter.

30. AI Development Needs Security-by-Design

AI teams often move quickly because the market is moving quickly.

Security controls cannot be postponed until after deployment.

31. Automated Dependency Scanning Is Essential

Organizations should continuously scan dependencies for vulnerabilities, malicious versions, unexpected maintainers, and suspicious changes.

Automation makes this practical at scale.

32. Security Teams Need Developer Context

Security alerts without software context can overwhelm defenders.

Teams need to know which application uses a dependency, where it runs, what credentials it can access, and what systems depend on it.

33. Supply-Chain Attacks Are Business Risks

A compromised dependency can cause downtime, regulatory exposure, intellectual-property loss, financial damage, and reputational harm.

This is no longer merely a developer-security issue.

  1. The Attack May Continue After the Package Is Removed

Removing a malicious dependency does not remove credentials that may already have been stolen.

This is one of the most important lessons from credential-stealing supply-chain attacks.

35. Rotation Is the Real Cleanup

Organizations should consider credentials potentially compromised until they have been rotated or cryptographically invalidated.

Deleting files is not enough.

  1. Detection Engineering Should Follow the Kill Chain

Security teams should monitor package installation, credential access, outbound connections, authentication anomalies, privilege escalation, and repository modifications.

Looking at only one stage leaves blind spots.

  1. The Biggest Victims May Not Know Yet

Supply-chain compromises are difficult because organizations may not realize that a dependency was compromised during the relevant period.

Delayed disclosure can therefore create a long investigation tail.

  1. Security Must Extend to the Developer Supply Chain

The security boundary now includes package maintainers, registries, build systems, source-control platforms, cloud providers, and AI services.

Protecting only the production server is no longer enough.

39. AI Security Is Becoming Infrastructure Security

As AI becomes embedded into enterprise applications, protecting AI software increasingly means protecting the infrastructure around it.

The distinction between “AI security” and “cloud security” is rapidly disappearing.

  1. SANDCLOCK Is a Warning, Not an Isolated Event

Whether every reported impact ultimately proves accurate or not, the underlying security lesson is undeniable.

A trusted open-source dependency can become a powerful delivery mechanism for credential theft.

The industry should treat this incident as a warning about where the next generation of attacks may concentrate.

✅ LiteLLM Is an Open-Source AI Gateway

LiteLLM is designed to provide a unified interface for interacting with multiple LLM providers and model backends. Its position within AI development makes dependency security particularly important.

✅ Supply-Chain Attacks Can Steal CI/CD Credentials

Malicious dependencies executed in developer or CI/CD environments can potentially access credentials exposed to those processes. The actual impact depends on permissions, configuration, and environment isolation.

⚠️ The Reported 2,500+ Organizations Require Careful Interpretation

The supplied article attributes the figure to incident research, while the specific manifests reportedly enumerate 898 GitHub owners and 2,038 repositories. These measurements describe different aspects of the incident and should not automatically be treated as identical victim counts.

⚠️ The 150GB Archive Is an Incident-Reporting Claim

The existence and contents of the reported archive should be understood as an attribution from the cited security research rather than independently verified evidence presented in the supplied text.

⚠️ Named Companies Should Not Automatically Be Interpreted as Fully Compromised

Being listed in a victim manifest does not necessarily mean that an entire enterprise network was breached. Exposure can involve a repository, credential, developer environment, or specific CI/CD asset.

Prediction
(+1) Supply-Chain Security Will Become a Core Requirement for AI Development

As AI applications depend on increasingly complex open-source stacks, organizations will invest more heavily in dependency verification, software provenance, SBOMs, package signing, and automated security monitoring.

(+1) Short-Lived Credentials Will Become More Common

The consequences of SANDCLOCK-style credential theft strengthen the argument for ephemeral authentication, workload identity, and automatically rotated secrets.

(+1) AI API Security Will Move Closer to Cloud Security

Organizations will increasingly treat OpenAI, Anthropic, Google, and other AI API credentials as critical infrastructure secrets rather than ordinary application configuration.

(-1) Supply-Chain Attacks Will Continue to Grow in Scale

Attackers have a powerful economic incentive to compromise trusted software rather than individually target thousands of organizations. As dependency networks grow, a single successful compromise can potentially reach an enormous downstream population.

(-1) Detection Delays Will Remain a Major Problem

Organizations that lack historical dependency visibility and centralized credential monitoring may discover compromises long after the original malicious package has been removed.

(+1) Provenance Will Become a Competitive Advantage

Companies capable of proving exactly where their software came from, which dependencies entered their builds, and which credentials were exposed will be able to respond to incidents much faster than organizations relying on manual investigation.

Final Takeaway: The Dependency You Trust Can Become the Door You Never Saw

The reported SANDCLOCK campaign illustrates one of

LiteLLM’s value comes from connecting applications to a broad AI ecosystem. Unfortunately, that same connectivity can make a compromised component extraordinarily attractive to attackers.

The reported TeamPCP operation demonstrates why modern security cannot stop at firewalls, endpoint protection, or production servers. Developers, GitHub repositories, package managers, CI/CD runners, cloud credentials, Kubernetes secrets, container registries, and AI API keys are all part of the same security chain.

The most important response is therefore not simply to remove a suspicious package.

Organizations must investigate historical exposure, identify every environment that executed the affected software, revoke potentially compromised credentials, rotate secrets, inspect repository activity, review cloud logs, and search for persistence.

The larger lesson is even more important.

In the AI era, a software dependency is no longer just a piece of code. It can be a bridge into identity, infrastructure, cloud services, and the entire digital supply chain.

🕵️‍📝Let’s dive deep and fact‑check.

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

References:

Reported By: securityaffairs.com
Extra Source Hub (Possible Sources for article):
https://stackoverflow.com
Wikipedia
OpenAi & Undercode AI

Image Source:

Unsplash
Undercode AI DI v2

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow UndercodeNews & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin | 🦋BlueSky | 🐘Mastodon | 📺Youtube