ServicesBlogPricingContactContact Now
Cyber Security3 min read

Claude Code and VS Code Hooks: The Keyv-Linked npm Worm

Claude Code and VS Code Hooks: The Keyv-Linked npm Worm

Introduction

In August 2026, a malicious npm worm named Keyv-Linked wreaked havoc on the JavaScript ecosystem. Initially targeting the Keyv and Cacheable namespaces, it quickly spread across 353 packages, infecting 79 package names. This worm, embedded in versions like keyv@6.0.0, posed a severe threat by stealing credentials and exploiting hooks in popular tools like Claude Code and VS Code. Its reach extended to 442 versions across 353 packages, with Aikido later identifying 868 compromised packages. This incident highlights the critical need for vigilance and proactive cybersecurity measures in the rapidly evolving world of open-source software.

The Rise of Keyv-Linked: A Malicious npm Worm

The Keyv-Linked worm emerged from the Keyv package, a popular library for caching and key-value storage. Its initial appearance in version 6.0.0 marked the beginning of a widespread infection. The worm’s primary function was to exfiltrate sensitive data, such as API keys and tokens, by exploiting vulnerabilities in package dependencies. By embedding itself in hooks within Claude Code and VS Code, it could intercept and steal credentials without detection. This stealthy behavior allowed it to propagate across multiple organizations, evading traditional security checks.

How Keyv-Linked Spread Across the npm Ecosystem

Keyv-Linked’s spread was facilitated by its integration into hooks, which are functions executed during package installation. These hooks acted as entry points, allowing the worm to infect other packages automatically. SafeDep, a security firm, detected 353 poisoned versions across 79 package names, revealing the worm’s extensive footprint. Aikido, another cybersecurity organization, later expanded this figure to 868 packages, emphasizing the worm’s ability to infiltrate deeply embedded systems. The worm’s creators leveraged the npm registry’s decentralized nature, making it difficult to trace and contain the infection.

The Impact on Developers and Organizations

Developers and organizations using the infected packages faced severe consequences. Credential theft could lead to unauthorized access to cloud services, databases, and internal tools. For instance, a compromised VS Code extension might expose sensitive project data, while a Claude Code hook could leak API keys for third-party services. The worm’s ability to remain undetected for extended periods increased the risk of long-term damage. Organizations had to perform extensive audits, revoke compromised credentials, and update dependencies to mitigate the threat.

Keyv-Linked’s Exploitation of Claude Code and VS Code

Claude Code and VS Code became unwitting hosts for Keyv-Linked due to their widespread use among developers. The worm exploited hooks in these tools to execute malicious code during package installations. For example, a malicious hook in a VS Code extension could trigger credential-stealing scripts when a user opened a project. Similarly, Claude Code’s integration with npm allowed Keyv-Linked to blend seamlessly into the development workflow. This dual exploitation underscored the importance of securing not just packages but also the tools and extensions that developers rely on daily.

Grivyonx Expert Analysis

The Keyv-Linked incident serves as a stark reminder of the vulnerabilities inherent in open-source ecosystems. While npm and similar registries enable rapid innovation, they also introduce risks when dependencies are not thoroughly vetted. Developers must adopt a proactive approach, including regular audits, dependency scanning, and the use of tools like Grivyonx Cloud’s AI-driven cybersecurity platform. By automating threat detection and response, Grivyonx helps organizations stay ahead of emerging threats like Keyv-Linked. Its integration with monitoring systems ensures that even the most subtle vulnerabilities are identified and neutralized before they escalate.

Conclusion

The Keyv-Linked npm worm’s infiltration of Claude Code and VS Code highlights the critical need for robust cybersecurity practices in the open-source world. As malicious actors continue to exploit vulnerabilities in widely used tools, developers must remain vigilant and adopt proactive measures. Grivyonx Cloud’s AI automation and cybersecurity services provide a powerful defense against such threats, ensuring that your projects remain secure and resilient. By leveraging advanced threat detection and real-time monitoring, Grivyonx empowers developers to navigate the complexities of the npm ecosystem with confidence. Stay informed, stay secure, and trust Grivyonx to safeguard your digital infrastructure.

  • #npm
  • #worm
  • #Keyv-Linked
  • #credential-stealing
  • #Claude Code
  • #VS Code
  • #Cybersecurity
Gourav Rajput

Gourav Rajput

Founder of Grivyonx Technologies