Keyv npm Worm Supply Chain Attack: A 2026 Case Study
In August 2026, a credential-stealing worm was discovered in the npm package 'keyv@6.0.0', rapidly spreading to hundreds of packages across multiple organizations. The malware utilized a 'preinstall' script to execute within developer and continuous integration environments, harvesting sensitive credentials such as repository access tokens, cloud service keys, and private keys. This allowed the attacker to further propagate the infection by publishing compromised versions of additional packages. The Keyv repository also contained malicious hooks in Claude Code and Visual Studio Code configurations, enabling payload execution when users trusted the workspace or permitted project configurations. This incident underscores the escalating threat of supply chain attacks targeting open-source ecosystems. The self-propagating nature of the worm highlights the critical need for robust security measures in package management and development environments. Organizations must implement stringent controls over dependency management, regularly audit third-party packages, and ensure that development tools are configured to prevent unauthorized script execution during package installation.
Kill Chain