Ethical Hacking News
GitHub has taken action to address a critical security flaw in its npm publishing system, which left over 1,500 packages vulnerable to hijacking. The flaw, which was discovered in July 2025, was introduced as part of the trusted publishing feature and allowed attackers to exploit a loophole in the way it identified repositories. By expiring unvalidated npm trusted publishing configurations and updating its documentation, GitHub is taking steps to protect users' packages and prevent supply chain attacks.
GitHub's npm publishing system had a critical security flaw that left over 1,500 packages vulnerable to hijacking.The flaw, dubbed "SlugFest," allowed attackers to exploit a loophole in the trusted publishing feature, which could be used to push malicious code to the registry.The vulnerability was introduced in July 2025 and was discovered by researchers at Bloom Security.GitHub has taken steps to address the vulnerability, including expiring unvalidated npm trusted publishing configurations and updating its documentation.Developers who maintain npm packages are advised to take steps to protect themselves, such as auditing trusted publisher bindings and monitoring for unexpected npm publish events.
GitHub, the popular web-based platform for version control and collaboration, has taken drastic measures to address a critical security flaw in its npm publishing system. The flaw, which was discovered by researchers at Bloom Security, left over 1,500 packages vulnerable to hijacking, allowing attackers to push malicious code to the registry and compromise users' packages.
The vulnerability, which was identified in July 2025, was introduced as part of the trusted publishing feature, which allows developers to push npm packages from a CI/CD platform, such as GitHub Actions, using OpenID Connect (OIDC) tokens. This feature eliminates the need to store, rotate, or manually manage long-lived npm secrets, reducing the risk of credential leaks.
However, the security architecture of the trusted publishing feature suffered from a critical flaw, which allowed attackers to exploit a loophole in the way it identified repositories. According to Golan Myers, a security researcher at Bloom Security, "The trust is anchored to a name as opposed to an immutable repository ID, a loophole that can be abused by claiming abandoned slugs to inherit their trust."
The loophole, which was dubbed "SlugFest," allowed attackers to create a new repository at a freed slug, trigger an npm publish workflow, and receive a time-limited publish token for a package they did not own. This token could then be used to push malicious changes to the registry, compromising users' packages.
The attack, which was described as a "cascading supply chain attack," could have far-reaching consequences, as AI agents running on developer machines could further complicate matters. "Agents resolve dependencies on their own, tend to take the latest version, and rarely check where a package came from," Bloom Security said. "A malicious version published through a reclaimed slug gets pulled in and runs with no human-in-the-loop."
GitHub has since taken steps to address the vulnerability, expiring unvalidated npm trusted publishing configurations 48 hours after creation. Researchers found that it was possible for an attacker to push new versions of a different user's package without having to steal their credentials.
"The change contains the risk associated with trusting a repository or project name that changes ownership, GitHub said, adding npm also rejects trusted publishing tokens from GitHub Actions issue_comment events going forward, along with the Existing pull_request_target restriction,"
The company has also updated its documentation to require newly created trusted publisher configurations to complete their first successful publish within two days, which validates the configuration and binds it to the "repository's immutable identity."
Developers who maintain npm packages are advised to perform a series of actions to protect themselves from this attack, including auditing trusted publisher bindings, verifying if the listed repository slug still resolves to the repository under their control, and monitoring for unexpected npm publish events.
The discovery of this vulnerability highlights the importance of security in software supply chain management. According to Myers, "The binding between a human-readable identifier and the thing it identifies is the most important invariant in any trust system. When that binding can be silently replaced – by the ordinary act of renaming a repository, not by any attacker action – the trust guarantee collapses."
This is not the first time unconventional supply chain attack vectors have been discovered. Earlier this August, Bloom Security also found that both Open VSX and Microsoft's VS Code Marketplace allowed extension packs to reference non-existent extensions in the marketplaces.
The discovery of this vulnerability serves as a reminder to developers and organizations to stay vigilant and proactive in their security efforts. By taking steps to address vulnerabilities and ensure the integrity of their software supply chain, they can reduce the risk of supply chain attacks and protect their users' packages.
Related Information:
https://www.ethicalhackingnews.com/articles/Github-Tightens-npm-Publishing-Security-After-Flaw-Exposes-1500-Packages-to-Hijacking-ehn.shtml
https://thehackernews.com/2026/10/github-tightens-npm-publishing-after.html
Published: Tue Oct 13 14:48:53 2026 by llama3.2 3B Q4_K_M