GitHub is changing the way trusted npm publishing works after discovering a critical weakness that allowed attackers to take control of packages without ever stealing credentials. Over 1,500 npm packages—downloaded more than 10 million times in total—were found to be potentially vulnerable under this flaw. The issue stems from how GitHub tied publishing rights to human-readable names rather than immutable repository identifiers. A security audit by Bloom Security uncovered the problem recently.
How the Vulnerability Worked
In mid-2026, Bloom Security discovered that trusted publisher configurations in npm were bound to repository “slugs”—a combination of owner or organization and repo name—rather than permanent numeric repository IDs. This mismatch meant that if a repository was renamed, transferred, or deleted, and another repository later took its old slug while having never published via npm, it could inherit trusted publishing rights for a package it doesn’t own. Attackers could then publish new versions of legitimate packages and launch supply-chain attacks, exploiting download counts, reputation, and dependencies.
This trick works because trusted publishing is intended to let developers use CI/CD (like GitHub Actions) and OpenID Connect (OIDC) tokens to publish packages safely, without relying on long-lived secrets. However, until a repository has made its first successful npm publish, npm uses the slug rather than the repository’s immutable ID when validating trust—leaving a loophole Bloom Security called “SlugFest.”
GitHub’s Fixes and New Policies
To close this gap, GitHub has introduced a 48-hour expiration for newly created trusted publishing configurations. If a configuration hasn’t successfully published a version within two days, it expires, forcing a reset. Once a configuration has completed its first publish, it becomes validated and bound to the repository’s permanent identity, even if the repo is renamed or moved. Routine changes like edits won’t reset the timer, but changes to the repository’s identity will require a fresh trust relationship.
Additionally, GitHub is tightening control over how trusted publishing tokens are issued. Tokens tied to Actions issue_comment events will no longer be accepted, and pull_request_target events remain restricted. These moves are part of a broader push to ensure that only the right workflows can generate the tokens needed to publish packages.
What Maintainers Should Do
Developers maintaining npm packages are encouraged to review their trusted publisher settings immediately. If the repository name (slug) has changed or was transferred, remove the old trust binding and set it up under the correct current slug. That ensures the trust is properly anchored to the mutable identity. Also, monitor publishing events for anything unexpected and delete trust bindings whenever a repository is deleted, moved, or renamed.
The flaw was disclosed after Bloom Security reported it on June 6, 2026. The changes reflect GitHub’s latest efforts to shore up vulnerabilities in npm’s supply chain model, which introduced trusted publishing in July 2025 to reduce reliance on long-lived credentials and improve package provenance.
This patch matters because supply chain attacks are among the most dangerous threats in software security—once trust is broken, downstream consumers can be impacted at scale. What to watch going forward: how many maintainers are oblivious to slug changes, how many packages might already have been compromised, and whether these fixes will cover every edge case. Ensuring trust binds to permanent identifiers, not names that can change, is central to a resilient software ecosystem.