Update GitHub repos now: npm Trusted Publishing flaw let attackers hijack 1,500+ packages via abandoned names
A vulnerability in npm's Trusted Publishing feature allowed unauthorized code pushes. GitHub has released fixes for the more than 1,500 affected packages.

Key points
- Researchers found that npm Trusted Publishing allowed attackers to push new package versions without stealing credentials.
- The exploit required only registering a GitHub repository name that a maintainer had previously abandoned.
- GitHub states it has shipped fixes for the more than 1,500 npm packages exposed to this takeover risk.
A flaw in the npm package registry allowed attackers to publish new versions of software packages without stealing any login credentials. This vulnerability affected more than 1,500 packages and was tied to how GitHub’s Trusted Publishing feature managed repository access. GitHub has confirmed that fixes have been shipped to address the security gap.
In plain English
The issue centered on a feature called Trusted Publishing, which is designed to let developers automatically publish new versions of their code when they push changes to GitHub. The system relies on trust between the code repository and the package registry. However, researchers discovered that this trust could be hijacked if an attacker registered a repository name that a package maintainer had left behind. By claiming that abandoned name, an attacker could trick the system into allowing them to publish updates to the original package.
The background
Bloom Security researchers identified the vulnerability in npm’s Trusted Publishing feature. They determined that an attacker did not need to steal a password or private key to exploit the flaw. Instead, the attacker only needed to register a GitHub repository name that the original maintainer had abandoned. Bloom Security counted more than 1,500 npm packages that were exposed to this specific takeover risk. GitHub, which owns npm, acknowledges the finding and states that it has shipped fixes for the affected packages.
What changes now
GitHub has addressed the vulnerability by shipping fixes for the exposed packages. System administrators and developers who use these npm packages should ensure they are using the updated versions provided by GitHub. The incident highlights the risks associated with automated publishing workflows when repository ownership or naming conventions are not carefully managed. Users should verify that their package sources are secure and that no unauthorized versions have been installed in their environments.
Key terms explained
Trusted Publishing is a feature that automates software releases by linking a code repository to a package registry. It allows code to be published automatically when developers push changes, reducing manual steps. Teams usually configure this to streamline updates, but it requires strict access controls. Check whether your organization uses automated publishing and ensure that abandoned repository names are not left open for registration, as this can create trust gaps.
What to do and how to stay safe: npm
- Audit your npm dependencies to ensure you are using the latest versions that include GitHub's fixes for the Trusted Publishing flaw.
- Review your GitHub repository settings to identify and reclaim any abandoned repository names that could be registered by attackers.
- Monitor your package installations for unexpected version changes or new maintainers, which could indicate a takeover attempt.
- Verify that your automated publishing workflows are restricted to active, monitored repositories and do not rely on legacy configurations.
General security guidance from the Vector Update newsroom. It is not confirmed advice from the organisations named in this story.
Frequently asked questions
Did attackers steal credentials to exploit this npm flaw?
No, researchers found that attackers did not need to steal credentials; they only needed to register an abandoned GitHub repository name.
How many packages were affected by this vulnerability?
Bloom Security counted more than 1,500 npm packages that were exposed to this takeover risk.
Has GitHub released a fix for the issue?
Yes, GitHub states that it has shipped fixes for the more than 1,500 npm packages exposed to the Trusted Publishing flaw.



