SlugFest: npm Trusted Publishing Flaw Exposed 1,500 Packages
By @sharedot · · 8 pages
- Programming
- Npm
- Supply Chain Security
- Github
- AI Agents
Bloom Security found npm trusted abandoned GitHub repo names instead of permanent IDs, exposing 1,500+ packages with 10 million downloads to takeover.
What happened: publish rights without stealing anything
Bloom Security researchers found that npm's Trusted Publishing feature let an attacker push new versions of someone else's package without stealing a credential or compromising a maintainer account.
The attack, codenamed SlugFest, required only that the attacker register a GitHub repository name the maintainer had left behind. Bloom counted more than 1,500 npm packages exposed this way, with more than 10 million total downloads and over one million per month.
GitHub, which owns npm, says it has shipped fixes, and Bloom told CSO it has not observed active exploitation in the wild.
The surprising detail: trust anchored to a name, not an ID
The flaw came from how npm initially verified trusted publishers: it recorded the repository's human-readable owner/repository slug rather than the permanent numeric ID GitHub assigns and carries in its OIDC tokens.
Security researcher Golan Myers likened it to 'a lock that checks the address on the door rather than who owns the house: when the owner moves out, whoever moves in gets the key.'
The only preconditions were a claimable slug and a binding never used to publish — entirely a function of the victim's own repository hygiene.
Demonstrated end to end on a real package
Bloom proved the issue using researcher-controlled GitHub repositories and an npm package under a researcher-owned scope, successfully publishing from a second repository belonging to another organization — the shared element was the reclaimed repository slug.
A release published this way also carries a valid provenance attestation naming the attacker's repository, and systems that verify only that an attestation exists, without checking whether its source matches the expected maintainer repository, can miss the change entirely.
AI agents amplify the blast radius
Bloom's telemetry across dozens of organizations suggests AI coding agents make flaws like this reach further: agents install roughly 70 packages per endpoint each month, rising to about 350 on developer machines, excluding transitive dependencies.
'Agents resolve dependencies on their own, tend to take the latest version, and rarely check where a package came from,' Bloom said. 'A malicious version published through a reclaimed slug gets pulled in and runs with no human-in-the-loop.'
Myers noted Bloom even caught and blocked a customer's agent trying to install one of the affected packages. 'A hijacked package doesn't need to find a developer anymore,' he told CSO.
'It only needs to be the package an agent chooses.'
GitHub's fix arrives after more than 120 days
Bloom reported the vulnerability through GitHub's HackerOne program on June 6, 2026; GitHub validated it on June 9, and Bloom says its last reply before the fix came on July 8, with six follow-ups including a mediation request going unanswered.
On October 2, GitHub announced that unvalidated Trusted Publishing configurations now expire 48 hours after creation, becoming validated and exempt from expiry after the first successful publish, which binds them to the repository's immutable identity. npm also rejects trusted publishing tokens from GitHub Actions issue_comment events.
CSO reports the npm team confirmed the fix shipped October 2.
What maintainers and security teams should do now
Maintainers with Trusted Publishing should run npm trust list and verify each configured repository slug still resolves to a repository they control, delete and recreate any binding pointing at a renamed or transferred repository, and remove bindings before deleting repositories.
Bloom is withholding the affected package names, so users cannot check against a list; Help Net Security suggests verifying that a package's provenance attestation names the repository the project is supposed to come from.
Enterprises are advised to audit installed software beyond traditional packages and enforce a supply-chain firewall. Bloom says npm's GitLab trusted publishing integration has the same weakness.
Sources
- thenextweb.com › npm Trusted Publishing flaw left 1,500 packages open to attackers
- helpnetsecurity.com › npm Trusted Publishing flaw exposed 1,500+ npm packages to takeover
- csoonline.com › Over 1,500 npm packages exposed by Trusted Publishing validation flaw
- thehackernews.com › GitHub Tightens npm Publishing After Flaw Left 1,500+ Packages Vulnerable to Hijacking
- cybersecuritynews.com › npm Trusted Publishing Flaw With 10 Million Downloads Exposes 1,500+ Packages to Malicious Takeover