Independent analysis by NHI Mgmt GroupSource article: Bloom Security, “SlugFest: Millions of AI Agents Install npm Packages Exposed to Malicious Takeover through GitHub” (June 6, 2026)

TL;DR: Millions of AI agents are increasing npm package exposure by installing far more dependencies than humans do, while Bloom Security shows that reclaimable GitHub slugs can let attackers mint valid publish credentials for trusted publishing. Immutable repository identity, not the human-readable name, has to anchor package trust.


At a glance

What this is: NHI Mgmt Group's analysis, drawing on Bloom Security's report: npm trusted publishing can be broken by reclaimed GitHub slugs, exposing more than 1,500 packages to takeover and malicious release publishing.

Why it matters: Identity and supply-chain teams need to treat repository rename, transfer and deletion events as trust changes, because package provenance can fail even when no credentials are stolen.

By the numbers:

  • More than 1,500 vulnerable npm packages were exposed to slug-reclaim takeover.
  • Those packages accounted for over 10 million downloads, with more than 1 million per month.
  • AI agents installed about 70 packages per endpoint each month, and developer machines reached close to 350.
  • The gap remained exploitable for over 120 days from disclosure to fix.

Context

Software supply chain trust breaks when a system treats a mutable name as if it were a stable identity. In this case, the relevant governance gap is not package signing itself, but the binding between a repository reference and the repository that actually controls it. That gap matters because AI agents now install packages autonomously, which expands the number of installs that can become an execution path.

Trusted publishing is designed to replace long-lived automation secrets with short-lived federated credentials, but the control only works if the issuer verifies the right identity attributes at exchange time. When a repository is renamed, transferred, deleted or recreated, a slug can remain the same while the underlying identity changes. That is a governance failure in provenance assurance, not just a registry implementation detail.

For practitioners, the starting assumption should be that repository lifecycle events are security events. A package trust binding that survives a rename or transfer without revalidation is atypical for a mature trust model.


Key questions

Q: How do I stop reclaimed repository slugs from breaking package trust?

A: Require trust bindings to use immutable repository identifiers, not just repository names. Revalidate every binding when a repository is renamed, transferred or deleted, and reject publish exchanges that do not match the expected repository_id and owner identity. That removes the opportunity for an attacker to recreate a freed slug and inherit the original trust relationship.

Q: Why do AI coding agents increase supply-chain risk?

A: AI coding agents can choose tooling, install packages, and edit lock files in ways that may bypass the controls humans expect in a managed environment. That widens the blind spot around untracked software and makes package provenance harder to enforce. The practical response is to restrict agent permissions, inventory their workspaces, and review their install behaviour like any other privileged automation.

Q: How does trusted publishing work with OIDC tokens?

A: Trusted publishing uses an OIDC token from the build or release workflow to prove the package was produced by an authorised pipeline, then exchanges that short-lived assertion for publish rights without storing a long-lived secret. The package registry checks the token claims, such as issuer, audience, repository or workflow identity, before accepting the upload.

Q: What should teams do first when a package trust binding might be exposed?

A: They should revoke or rotate the exposed trust binding first, then disable any credential or token that can still publish packages, and inspect recent package uploads for unauthorised releases. If the binding was tied to a CI workflow, the team should also narrow the workflow's OIDC claims and reissue any signing or publish credentials that may have been abused.


Technical breakdown

Why slug-based trust bindings fail

Trusted publishing uses federated identity so a build workflow can exchange an OIDC token for a short-lived registry credential. The weakness appears when the registry binds trust to a human-readable repository slug instead of immutable repository identifiers. A slug can be reassigned after rename, transfer or deletion, while the numeric repository_id and repository_owner_id stay stable. If the exchange logic checks only the slug and workflow filename, an attacker can recreate the same path and satisfy the trust condition without controlling the original repository. See the Agentic AI Identity Guide.

Practical implication: Bind package trust to immutable repository IDs, not names, before accepting any publish credential.

How autonomous agents amplify package exposure

Coding agents change the package threat model because they select and install dependencies on their own, often without a human reviewing the maintainer, release history or provenance path. That means a malicious package does not need to trick a developer directly. It only needs to appear trustworthy enough for the agent to select it during normal dependency resolution. Each automatic install can trigger postinstall hooks, transitive downloads and fresh execution paths across endpoints and CI systems. See the AI Coding Agents Security Guide.

Practical implication: Treat agent-driven installs as independent supply-chain decisions and gate them with policy and provenance checks.

What a valid publish token enables downstream

A successful token exchange is only the first stage of impact. Once an attacker can publish under the legitimate package name, they inherit the package's reputation, download base and dependency graph. That creates a direct path to malicious postinstall execution, transitive dependency compromise and provenance confusion if downstream tools validate only that a package is signed rather than whether the attesting repository matches the expected maintainer identity.

Practical implication: Verify attestation source and package lineage, not just whether a release is signed.


Threat narrative

Attacker objective: The attacker wants to turn a trusted package release path into a distribution channel for malicious code that reaches downstream developers, agents and build systems.

  1. Entry begins when a trusted-publishing binding points to a GitHub slug that can be reclaimed after a rename, transfer or deletion.
  2. Credential access occurs when the attacker recreates the slug, requests an OIDC token and exchanges it for a short-lived npm publish credential without touching the victim's account.
  3. Escalation happens when the attacker publishes a malicious package version under the legitimate name and the new release inherits existing trust and download reach.
  4. Impact follows when AI agents, developer workstations or CI systems install the tainted package and execute attacker-controlled code through dependency resolution or postinstall hooks.
  • Trivy supply chain attack 2026: A PAT stolen via a Trivy workflow and a botched rotation let TeamPCP poison Trivy releases and Action tags to steal CI/CD secrets.
  • Smithery.ai MCP hosting breach 2025: A Smithery.ai build flaw gave GitGuardian a live fly.io token controlling 3,000+ hosted MCP servers and the API keys their clients sent.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Mutable names cannot serve as security identities. Bloom Security's research shows that trusted publishing collapses when a registry binds trust to a repository slug that can later be reclaimed. The security invariant should be the immutable repository identity, not the address string that happened to exist at trust creation time. Practitioners should treat repository rename and deletion as changes to trust posture, not admin housekeeping.

AI agents convert supply-chain weakness into a higher-frequency execution path. When agents install packages without human review, one successful package takeover reaches more systems, more often, and with less scrutiny than a human-led workflow. That shifts supply-chain risk from occasional compromised installs to a continuous automated intake problem. Governance now has to cover the decision layer where packages are selected, not just the registry where they are published.

Provenance that is only syntactically valid is not enough. The article shows why signed output can still be unsafe if the signer identity does not match the maintainer identity the consuming system expected. That is a classic identity binding failure: the control validates format and freshness, but not the right principal. Supply-chain programmes should require attestation checks that tie the release back to the approved repository and owner.

Repository lifecycle events need revocation semantics. Rename, transfer and deletion should trigger binding review, because they can silently sever the original ownership relationship while leaving trust artefacts in place. That is the named failure mode here: repository slug reclaim exposure, a trust gap created by treating a mutable handle as a stable authority. Security teams should build revocation and revalidation into repository governance.

Package trust and agent trust are now the same governance problem. Once an AI system can fetch dependencies and act on them, package provenance becomes part of agent authorisation. Bloom Security's findings connect software supply chain security to identity lifecycle control in a direct way: if the identity behind a package binding changes, the agent should not keep trusting it. Practitioners need a unified policy for package provenance, workflow identity and automated install approval.

From our research library:

What this signals

Repository slug reclaim exposure: the security failure is not package signing itself but the assumption that a mutable repository name still represents the same authority after rename, transfer or deletion. That failure mode will keep surfacing anywhere trust is anchored to human-readable identity instead of immutable provenance, especially as agents install more software automatically.

The 70% figure shows why the issue scales quickly: according to the 2026 Infrastructure Identity Survey, organisations already grant AI systems more access than they would give a human employee doing the same job. Once those systems also install dependencies, provenance checks have to move earlier in the workflow and stay tied to repository identity.

Programmes that separate software supply chain policy from AI agent policy will miss the shared control point. The same governance model that manages delegated identity, lifecycle revocation and attestation integrity should now cover package selection, publish trust and autonomous install paths.


For practitioners

  • Rebind trusted publishing to immutable repository IDs At trust creation time, resolve every repository slug to its current repository_id and repository_owner_id, then require exact equality at exchange time.
  • Treat repository lifecycle events as revocation events If a bound repository is renamed, transferred or deleted, invalidate the trust binding and recreate it only after confirming the new authoritative repository identity.
  • Audit agent-driven package installation paths Inventory the endpoints, IDEs, CLIs and assistants that install packages autonomously, then enforce allowlists and provenance checks before dependency fetch and execution.
  • Verify attestation source, not just signature presence Require downstream checks to confirm that the signing or provenance attestation matches the maintainer repository you expect, not merely that a signature exists.
  • Monitor for unexpected publish events Alert on package releases from repository paths that were recently renamed, transferred or recreated, especially when the package has high dependency reach.

Key takeaways

  • Trusted publishing can still fail when a registry binds trust to a reclaimable repository slug instead of immutable repository identity.
  • Bloom Security found more than 1,500 vulnerable npm packages with over 10 million downloads, showing that the impact extends well beyond isolated maintainer accounts.
  • The practical control is lifecycle-aware trust management: revalidate bindings on rename, transfer or deletion, and verify provenance against the expected repository.

Related NHI Mgmt Group resources: Agentic AI Identity Guide · AI Agent Authorisation Guide · AI Coding Agents Security Guide · postmark-mcp malicious MCP server 2025


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, OWASP Agentic AI Top 10, OWASP API Security Top 10 and MITRE ATT&CK define the specific risk controls and attack patterns relevant to this term.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-01 — Improper OffboardingRenamed, transferred and deleted repositories leave stale trust bindings behind, which is an offboarding failure for repository identity.
NHI-04 — Insecure AuthenticationThe registry authenticates publish requests using mutable slug claims instead of immutable repository identity.
Recommendation — Revoke and recreate trust bindings whenever repository ownership changes so stale identities cannot keep publishing. Require immutable identity claims in federated publish exchanges and reject slug-only matches.
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseAutonomous agents install packages and can abuse over-trusted dependency selection paths.
Recommendation — Constrain agent tool and install privileges so package selection cannot bypass provenance policy.
OWASP API Security Top 10API2 — Broken AuthenticationThe publish exchange accepts an identity binding that is no longer authoritative, weakening authentication semantics.
Recommendation — Harden publish endpoints so token exchange validates the intended principal, not just a reusable name.
MITRE ATT&CKTA0006;TA0011;TA0040 — Credential Access; Command and Control; ImpactThe attack path uses token exchange to gain publishing capability, then uses that channel to deliver malicious code.
Recommendation — Map stale trust bindings to credential access and monitor publish paths for malicious release activity.

Key terms

  • Trusted Publishing: Trusted publishing is a release method that ties package publication to a verified CI workflow, usually with short-lived identity tokens and provenance evidence. It reduces the value of stolen legacy credentials, but only if older publish paths are fully removed and not left alongside the new flow.
  • Oidc Token Exchange: OIDC token exchange is the process of swapping an OpenID Connect token for another credential or access token that a target service accepts. It is used to bridge identity between systems, often letting a workload or workflow present a short-lived assertion instead of a stored secret.
  • Agentic Software Installation: Agentic software installation is the deployment of software that can make independent runtime decisions and install packages or tools as part of its own task execution. The key control point is the agent's authority to fetch, verify, and add software, because that can expand its access, supply chain exposure, and blast radius.
  • GitHub Repository ID: A GitHub Repository ID is the unique numeric identifier assigned to a repository. It stays the same even if the repository name, owner, or visibility changes, so tools can track the same repo reliably through APIs and automation.

Deepen your knowledge

NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, secrets management, and workload identity. It helps practitioners connect identity lifecycle control to the governance decisions their programmes already depend on.
NHIMG Editorial Note
Published by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org