Supply Chain Risks in GitHub and npm Package Ecosystems
Recent analysis has revealed a critical security flaw in how package managers such as npm, Bun, and PyPI handle dependencies sourced directly from GitHub repositories. When specifying a dependency using a commit SHA, if that SHA exists in a forked repository, the package manager may pull code from the fork rather than the intended source, allowing attackers to inject malicious code by manipulating forks. This vulnerability is exacerbated by the lack of visibility into GitHub's internal network of forks, making it difficult for security tools and registries to detect or warn about such attacks, as demonstrated by incidents involving actors like Shai Hulud.
In parallel, AWS Security has reported on their response to recent large-scale npm supply chain threat campaigns, including the Nx package compromise, the Shai-Hulud worm, and a token-farming campaign that resulted in over 150,000 malicious packages being identified. These incidents highlight the growing sophistication and scale of attacks targeting open-source software supply chains, and underscore the need for improved detection, response workflows, and collaboration across the security community to mitigate these evolving threats.

Get ahead of threats like this
Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
How this story unfolded
3 events from the most recent confirmed update back to the earliest known activity.
Security community presses GitHub for API-level repository provenance controls
Security practitioners repeatedly asked GitHub to expose fork-network provenance through its API so package managers and security tools could detect when a commit came from a fork. A proposed mitigation was a strict API parameter that would return only commits present in the specified repository.
Attackers exploit GitHub fork-network commit ambiguity
By December 2025, attackers were actively exploiting GitHub's fork-network behavior, where package managers resolving a commit SHA could retrieve code from a fork rather than the intended repository. This created a supply-chain risk across ecosystems such as npm, Bun, and PyPI.
AWS responds to multiple npm supply chain campaigns in 2025
During 2025, AWS Security responded to several major npm supply chain incidents, including the Nx package compromise, the Shai-Hulud worm, and a token-farming campaign targeting tea[.]xyz tokens. The response included rapid detection, coordinated investigation, automated blocklisting, and collaboration with OpenSSF.
Related entities
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
Sources
2 references tracked. Mallory keeps watching after this page renders.
See the full picture, correlated to your attack surface.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.


