Source: The Hacker News
GitHub has moved to close a significant gap in npm’s trusted publishing mechanism. Newly created trusted publishing configurations are now expired 48 hours after creation unless they complete their first successful publish, which validates the configuration and binds it to the repository’s immutable identity. npm also now rejects trusted publishing tokens from GitHub Actions issue_comment events, alongside the existing pull_request_target restriction.
The loophole researchers found
The change responds to research from Bloom Security, reported to GitHub in June 2026, which showed that npm’s trusted publishing anchored trust to the repository slug, the owner and repository name, rather than the permanent numeric ID GitHub assigns to every repository. When a repository was renamed, deleted or transferred, an attacker could claim the abandoned name and inherit the trusted publisher relationship, allowing them to publish new versions of someone else’s package without stealing any credentials. Researchers estimated the technique could have exposed more than 1,500 packages to hijacking and enabled a cascading supply chain attack. Trusted publishing was introduced in 2025 as a credential-free way to publish from CI/CD using OpenID Connect tokens, and it remains a genuine improvement over long-lived npm tokens. This episode is a reminder that even well-designed trust systems need continuous scrutiny.
What development teams should take from this
If your team publishes npm packages with trusted publishing, check that your configurations are validated, audit who can rename or transfer the repositories behind your packages, and make sure you have alerts for unexpected publishes. Dependabot and lockfile review catch malicious updates only if someone is watching. For teams building AI-assisted pipelines, the risk is amplified, since an agent that automatically pulls a compromised dependency can spread it across many projects in seconds.
If you want a review of your CI/CD publishing setup, dependency risk posture and supply chain hardening, contact Excello Digital at https://excello.digital/contact/. We help European development teams ship fast without inheriting someone else’s compromise.
