TL;DR: A PyPI-distributed LiteLLM package exposed credential-stealing code capable of pulling environment variables, cloud credentials, SSH keys, and other secrets from affected environments, while Kong said its runtime stack was not affected, according to Kong and coverage cited in the article. The incident shows how AI proxy supply chains can become secret exfiltration paths when organisations trust transitive dependencies too broadly.
At a glance
What this is: Kong’s security update says its stack was not affected by the PyPI LiteLLM incident, which involved a malicious package that could steal secrets from installed environments.
Why it matters: It matters because AI gateways, API layers, CI/CD systems, and machine identities all depend on transitive software trust, and one compromised dependency can expose credentials across NHI and IAM programmes.
By the numbers:
- Any environment that ran pip install litellm==1.82.8 during the approximately 4-hour exposure window could have pulled the compromised dependency.
👉 Read Kong's security update on the PyPI LiteLLM supply chain attack
Context
LiteLLM supply chain exposure is a dependency-trust problem, not just a package-malware problem. When a widely used AI proxy library is swapped for a malicious build on PyPI, the risk is not confined to the library itself. It extends into environments that install it, the secrets those environments can reach, and the service accounts or cloud identities those secrets unlock.
For IAM and NHI teams, the operational issue is transitive trust. AI tooling often sits inside development environments, CI/CD pipelines, and application runtime paths where secrets are already concentrated. If package provenance is weak and runtime identity scope is broad, a single compromised package can turn routine installation activity into credential exposure across the software supply chain.
Key questions
Q: What breaks when a compromised package can read secrets during installation?
A: The main failure is that package installation becomes an identity event. If the environment exposes tokens, keys, or certificates while a dependency executes, the attacker does not need application-level access first. They can steal reusable credentials and move into cloud, CI/CD, or internal systems that trust those secrets.
Q: Why do AI proxy libraries increase secret exposure risk?
A: AI proxy libraries often sit close to cloud credentials, API keys, and service tokens because they broker traffic between applications and models. That proximity makes them high-value targets. A malicious or tampered dependency can collect multiple secret types from one runtime, turning a software issue into a broader identity exposure problem.
Q: How can teams reduce risk from transitive dependencies in CI/CD pipelines?
A: Teams should pin versions, review indirect dependencies, and require provenance checks before build-time execution. They should also strip unnecessary secrets from build agents so a compromised package cannot harvest credentials that were only present for convenience. Dependency control and secret minimisation have to work together.
Q: Who should investigate if a package install may have been compromised?
A: Security, platform, and identity teams should investigate together. The first question is not only which code was installed, but which credentials were reachable at the time. If tokens, cloud keys, or SSH keys were present, they should be treated as exposed and rotated before the environment returns to service.
Technical breakdown
How PyPI package tampering turns installation into secret theft
A malicious PyPI package is dangerous because installation itself can execute code before an operator realises the dependency has changed. In this case, the package was designed to run a credential-stealing script that read local environment variables and other reachable secret material. That means the attack surface is not limited to the library API. It also includes build steps, dependency resolution, and any pipeline that automatically installs or upgrades packages without provenance checks.
Practical implication: require package provenance controls and block unsigned or unreviewed dependency changes in build and deployment paths.
Why AI proxy layers concentrate NHI and cloud credential risk
AI proxy libraries sit between applications, models, and external services, so they often inherit broad access to tokens, API keys, certificates, and cloud identities. That makes them attractive to attackers because one compromise can reveal multiple credential types at once. The problem is structural: the library may be installed for convenience, but it becomes a high-value secret collector if it runs in environments where credentials are mounted, inherited, or cached.
Practical implication: segregate AI proxy workloads from high-value secrets and reduce credential scope before any dependency executes.
Transitive dependency trust in CI/CD and development environments
Transitive dependencies are libraries pulled in by other packages, often without direct operator awareness. In CI/CD and development pipelines, that matters because the environment frequently has access to source code, signing material, cloud credentials, and deployment tokens. If a transitive package is compromised, the attacker does not need to break the application first. They only need the pipeline to install or update it while secrets are present.
Practical implication: inventory indirect dependencies, pin versions, and add controls that validate what enters the pipeline before execution.
Threat narrative
Attacker objective: The attacker’s objective is to steal reusable credentials and use them to expand access into cloud, development, or adjacent runtime environments.
- Entry occurred when organisations installed or upgraded the compromised LiteLLM package from PyPI during the exposure window.
- Credential theft followed as the malicious package executed code that harvested environment variables, cloud credentials, SSH keys, and other secrets.
- Impact would occur when those stolen secrets were reused to access development, cloud, or adjacent production systems.
Breaches seen in the wild
- LiteLLM PyPI package breach — LiteLLM PyPI supply chain attack, credentials stolen from users.
- Shai Hulud npm malware campaign — Shai Hulud campaign: npm malware exposed secrets on GitHub.
Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Supply chain trust is now an identity problem, not only a software provenance problem. A malicious package is valuable because it can reach secrets, tokens, and certificates that identity teams assume are protected by perimeter or host controls. When installation-time code runs in a secrets-rich environment, package trust becomes credential trust. Practitioners should treat dependency integrity as part of identity governance, not a separate application hygiene issue.
AI proxy libraries create a concentrated secret-exposure zone. The article shows why tooling that brokers AI traffic often ends up adjacent to cloud credentials, SSH keys, and runtime tokens. That concentration turns a single dependency compromise into a multi-identity event rather than a simple malware incident. The practical conclusion is that AI infrastructure inherits the same blast-radius problem that machine identity teams already see in over-permissioned service accounts.
Transitive dependencies now sit inside the attack path for NHI governance. If a build or runtime pipeline installs a compromised library while credentials are present, the identity boundary has already failed before the application starts. This is the same failure pattern that NHI teams see when secrets live longer than the trust decision that introduced them. Practitioners should reclassify dependency intake as an identity-controlled event, not just a developer convenience.
Credential reuse is what turns package compromise into enterprise compromise. The stolen material in these incidents is rarely valuable in isolation. Its value comes from the ability to reuse the same secret across cloud services, CI/CD, and internal APIs. That means the governance question is not only whether a package is malicious, but whether the credentials available to it can open multiple doors at once. Teams should measure how far a single secret can travel.
Ephemeral install trust debt: Packages that run once can still expose long-lived identity material in seconds. That assumption fails when build agents, developer machines, or application containers automatically supply secrets at install time. The implication is that identity governance must consider the moment a dependency is executed, not only the moment a workload is provisioned.
From our research:
- 80% of organisations report their AI agents have already performed actions beyond their intended scope, including accessing unauthorised systems, inappropriately sharing sensitive data, and revealing access credentials, according to AI Agents: The New Attack Surface report.
- Only 52% of companies can track and audit the data their AI agents access, leaving 48% with a complete blind spot for compliance and breach investigation.
- OWASP Agentic AI Top 10 is the right next reference point when package trust and runtime tool access start to overlap.
What this signals
Secret exposure will increasingly start before the application runs. When dependency installation can execute credential-stealing code, the boundary between software supply chain and identity governance disappears. Programmes that still treat package management as a developer-only concern will miss where the breach actually begins, especially in AI tooling that sits close to cloud and model credentials.
Runtime identity scope now has to account for build-time compromise. If a compromised package can harvest secrets from a pipeline or developer environment, then the question is not just whether the secret was rotated. It is whether the pipeline ever needed that secret in the first place. That is why least privilege, secret minimisation, and dependency provenance must be assessed together.
Transitive dependency risk is a strong candidate for the next identity governance blind spot. The organisations most exposed will be the ones that combine broad environment inheritance with automatic upgrades. If your programme already tracks service account sprawl and workload identity scope, extend the same discipline to package intake and AI proxy layers before the next exposure window becomes an incident.
For practitioners
- Map which build and runtime environments expose secrets during package install Identify every place where pip install, dependency upgrades, or container builds can access cloud credentials, SSH keys, signing material, or API tokens. Treat those environments as secret-exposure zones and remove unnecessary identity material before installation begins.
- Pin and verify indirect dependencies in AI and API toolchains Lock versions for direct and transitive packages, review release provenance, and block unapproved upgrades in CI/CD. The goal is to stop an indirect dependency from changing the trust profile of a pipeline without operator review.
- Separate AI proxy services from broad credential sets Run AI proxy and gateway components with narrowly scoped identities and minimal secret access. If a proxy needs a token, issue a task-specific credential rather than inheriting all environment secrets from the host.
- Add incident triage steps for compromised package installs If an environment installed a suspect package, assume any reachable secret was exposed and rotate the affected credentials before resuming normal operation. Prioritise cloud keys, SSH keys, and service tokens that may have been available at install time.
Key takeaways
- The LiteLLM incident shows that a compromised package can turn installation into credential theft when secrets are available in the environment.
- AI proxy and agent-tooling stacks are especially exposed because they often sit close to cloud keys, SSH material, and other reusable identity secrets.
- The practical control point is not only patching, but reducing secret exposure, pinning dependencies, and validating provenance before any package executes.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 | Addresses secret exposure and credential handling in compromised dependency paths. |
| NIST CSF 2.0 | PR.DS-1 | Data-at-rest and secret protection are directly implicated when packages can read environment credentials. |
| NIST Zero Trust (SP 800-207) | PR.AC-4 | Least privilege is central when AI proxy services and pipelines inherit broad access. |
Reduce exposed secrets in build and runtime environments, then validate that protections remain effective.
Key terms
- Transitive Dependency: A transitive dependency is a package that your software uses indirectly through another package. In identity terms, it can still execute code, access secrets, and influence trust boundaries even when the development team never chose it explicitly. That makes provenance and version control part of runtime risk management.
- Secret Exposure Zone: A secret exposure zone is any environment where credentials, tokens, keys, or certificates are present while untrusted or newly installed code can run. Build agents, developer machines, and container images often fall into this category. The more secrets that are available at execution time, the larger the blast radius of a package compromise.
- Package Provenance: Package provenance is the evidence that a software package came from a trusted source and has not been tampered with in transit or at publication. For security teams, provenance is not just a supply chain concern. It is a control on whether code is allowed to enter environments that already contain valuable identity material.
- Credential Reuse: Credential reuse is the practice of using the same token, key, or secret across multiple systems or stages. It creates outsized risk because a single exposed secret can unlock several environments. In identity governance, reuse increases blast radius and makes a one-time compromise much harder to contain.
Deepen your knowledge
NHI governance, agentic AI identity, and machine identity security are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are responsible for identity security strategy or NHI governance in your organisation, it is worth exploring.
This post draws on content published by Kong covering the PyPI LiteLLM supply chain attack: Kong Security Update: Kong Is Not Affected by the PyPi-Distributed LiteLLM Supply Chain Attack. Read the original.
Published by the NHIMG editorial team on 2026-03-25.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org