GitHub fixes npm Trusted Publishing flaw that exposed over 1,500 packages
Researchers found a flaw in npm's Trusted Publishing feature allowed unauthorized package updates without credential theft. GitHub has released fixes.

Key points
- Bloom Security researchers identified the vulnerability in npm's Trusted Publishing feature.
- The flaw allowed attackers to push new versions of packages by registering abandoned GitHub repository names.
- More than 1,500 npm packages were exposed to this takeover risk.
GitHub has shipped fixes for a security flaw in npm’s Trusted Publishing feature that allowed attackers to push new versions of packages without stealing credentials, according to Help Net Security. The issue exposed more than 1,500 npm packages to potential takeover by malicious actors who could exploit abandoned repository names.
Bloom Security researchers discovered that the Trusted Publishing feature permitted an attacker to register a GitHub repository name that a maintainer had left behind. This action allowed the attacker to push new versions of someone else’s package without needing to steal any authentication credentials. The researchers counted more than 1,500 npm packages exposed to this specific vector.
Context and Background
The vulnerability highlighted a significant gap in how package publishing workflows interact with version control systems. By leveraging the Trusted Publishing feature, an attacker could bypass traditional credential theft methods. The exploit required only the registration of a GitHub repository name associated with the abandoned package, effectively granting control over future updates.
GitHub, which owns npm, confirmed that it has shipped fixes for the issue. This response aims to close the window of opportunity for attackers seeking to compromise the integrity of the npm ecosystem. The fix addresses the specific mechanism that allowed unauthorized repository name registration to trigger package updates.
Who Is Affected
More than 1,500 npm packages were identified as being exposed to this takeover risk. Maintainers of these packages were vulnerable to having their software updated by unauthorized parties. The flaw affected packages that utilized the Trusted Publishing feature and had associated GitHub repository names that were not properly secured or were abandoned.
Developers relying on these packages could have unknowingly installed compromised versions pushed by attackers. The incident underscores the importance of monitoring repository ownership and publishing permissions. Users of the affected packages should remain vigilant for unexpected version changes or behavior anomalies.
What should you do?
Organizations should verify the integrity of their npm packages and monitor for unauthorized updates. Teams should review their publishing workflows to ensure that repository names are properly managed and secured. Developers should stay informed about updates from GitHub and npm regarding this specific vulnerability.
What to do and how to stay safe: npm
- Audit your npm package dependencies for any unexpected version changes or new maintainers.
- Review and secure your GitHub repository names to prevent unauthorized registration by attackers.
- Monitor official channels from GitHub and npm for further updates on the Trusted Publishing fix.
- Implement strict access controls for package publishing workflows to minimize exposure.
Step-by-step guide: Mobile Device Security: How to Protect Data Beyond Passwords
General security guidance from the Threat Times newsroom. It is not confirmed advice from the organisations named in this story.
Frequently asked questions
How did the attacker exploit the npm Trusted Publishing flaw?
The attacker registered a GitHub repository name that the maintainer had left behind, allowing them to push new versions of the package without stealing credentials.
How many packages were exposed to this vulnerability?
Bloom Security researchers counted more than 1,500 npm packages exposed to this takeover risk.
Has a fix been released for the npm Trusted Publishing flaw?
Yes, GitHub, which owns npm, says it has shipped fixes for the issue.


