CanisterWorm: The Self-Spreading Malware Hiding in npm Packages (2026)

In today's rapidly evolving digital landscape, we find ourselves grappling with yet another sophisticated supply chain attack, this time targeting the popular Trivy scanner. The implications of this attack are far-reaching and serve as a stark reminder of the ever-present threats lurking in the shadows of our interconnected world.

The Unraveling of a Complex Attack

The threat actors behind this attack have demonstrated a remarkable level of ingenuity. By leveraging a compromised credential, they managed to publish malicious releases of 'trivy', 'trivy-action', and 'setup-trivy', which contained a stealthy credential stealer. This initial breach opened the door for a series of follow-on attacks, compromising a significant number of npm packages with a self-propagating worm dubbed 'CanisterWorm'.

What makes this attack particularly fascinating is the use of an ICP canister, a tamperproof smart contract on the Internet Computer blockchain, as a dead drop resolver. This marks the first documented abuse of such a system for malicious purposes. The attacker's choice of this decentralized infrastructure highlights their understanding of the resilience and resistance to takedown efforts that such a system provides.

A Worm with a Twist

The infection chain involves a postinstall hook that executes a loader, dropping a Python backdoor. This backdoor communicates with the ICP canister to retrieve the next-stage payload's URL. The persistence mechanism is established through a systemd user service, cleverly disguised as PostgreSQL tooling, ensuring the backdoor restarts automatically if terminated.

One of the most intriguing aspects is the worm's ability to self-propagate. The attacker initially used a 'deploy.js' file to spread the malicious payload, but in a subsequent iteration, this functionality was incorporated into 'index.js', allowing the worm to collect npm authentication tokens from the victim's machine and propagate itself without manual intervention. This evolution in the attack chain is a worrying development, as it demonstrates the attacker's adaptability and resourcefulness.

A Deeper Look

The use of a youtube[.]com-based kill switch, as flagged by Wiz, adds an interesting layer of complexity. This kill switch, which currently points to a rickroll YouTube video, allows the attacker to disarm the implant by switching back to a YouTube link. This suggests a level of control and flexibility in the attacker's operations, enabling them to easily modify the behavior of the worm.

Furthermore, the ICP canister supports three methods, including 'update_link', which allows the threat actor to modify the payload at any time. This dynamic nature of the attack infrastructure highlights the attacker's ability to adapt and respond to changing circumstances, making it a formidable challenge for defenders.

The Human Factor

What many people don't realize is that these attacks often rely on human factors. In this case, the worm's ability to compromise accounts and publish itself is dependent on the presence of npm tokens accessible to developers or CI pipelines. This underscores the importance of security awareness and the need for organizations to implement robust access control measures.

Conclusion

The CanisterWorm attack is a stark reminder of the evolving nature of cyber threats and the need for constant vigilance. As we navigate the complex landscape of supply chain attacks, it is crucial to stay informed, adapt our defenses, and remain vigilant against these ever-evolving threats. The digital world is a battlefield, and we must be prepared for the unexpected.

CanisterWorm: The Self-Spreading Malware Hiding in npm Packages (2026)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Merrill Bechtelar CPA

Last Updated:

Views: 5521

Rating: 5 / 5 (50 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Merrill Bechtelar CPA

Birthday: 1996-05-19

Address: Apt. 114 873 White Lodge, Libbyfurt, CA 93006

Phone: +5983010455207

Job: Legacy Representative

Hobby: Blacksmithing, Urban exploration, Sudoku, Slacklining, Creative writing, Community, Letterboxing

Introduction: My name is Merrill Bechtelar CPA, I am a clean, agreeable, glorious, magnificent, witty, enchanting, comfortable person who loves writing and wants to share my knowledge and understanding with you.