A widespread and automated software supply chain attack, dubbed CHAINDROP, was identified on August 4, 2026. This self-propagating worm, a variant of the Shai-Hulud malware family, compromised the maintainer account for the popular keyv npm package. It then used these credentials to inject malicious code into over 1,300 dependent packages, affecting projects with a combined total of over two billion monthly downloads. The malware is designed to steal developer credentials for services like npm, GitHub, and AWS, as well as cryptocurrency wallets and AI configuration files. The Cyber Security Agency of Singapore (CSA) has issued an advisory, urging organizations to review their dependencies and treat credentials on affected systems as compromised.
The attack began with the compromise of the maintainer account for keyv, a key-value storage library with over 600 million monthly downloads. The threat actors published a malicious version of keyv containing the CHAINDROP worm. The worm's design is insidious; it automatically identifies all other packages the compromised maintainer has access to and publishes backdoored versions of them. This created a cascading effect, rapidly spreading the malware through the npm ecosystem.
Key affected packages include:
keyv (version 6.0.0)flat-cache (version 6.1.24)cacheable-requestfile-entry-cache (version 11.1.6)Researchers at Elastic, who first identified the campaign, noted its rapid propagation. The malware is cross-platform, targeting Linux, macOS, and Windows systems, maximizing its potential victim pool within the developer community.
The attack vector relies on a legitimate npm feature: the preinstall script in the package.json file. This hook allows commands to be executed automatically before a package is installed, requiring no user interaction beyond running npm install.
keyv).preinstall script executes a dropper, often disguised with names like Math_Symbol.js or math_init.js..npmrc, .git-credentials, and AWS configuration files. It also targets cryptocurrency wallet files and AI-related API keys.Commits generated by the worm can be identified by the author name claude and the commit message chore: update config. This pattern suggests an automated process.
preinstall hook.The business impact of the CHAINDROP attack is severe. Organizations that rely on the affected packages are at immediate risk of credential theft, leading to potential breaches of their internal systems, cloud infrastructure, and source code repositories. The theft of developer credentials can facilitate deeper intrusions, lateral movement, and further supply chain attacks. The cost of remediation, including identifying all compromised systems, revoking and rotating all potentially stolen credentials, and auditing codebases, is substantial. The attack also erodes trust in the open-source ecosystem, forcing development teams to allocate more resources to dependency vetting and security.
claudechore: update configMath_Symbol.jsmath_init.jsSecurity teams may want to hunt for the following patterns to identify potential compromises related to this campaign:
node Math_Symbol.js**/node_modules/**/Math_Symbol.js"preinstall": in package.jsonpreinstall scripts.npm audit or third-party Software Composition Analysis (SCA) solutions to identify vulnerable versions of keyv and other affected packages in all applications.preinstall scripts that invoke suspicious files like Math_Symbol.js.package-lock.json, yarn.lock) to ensure that builds use exact, vetted versions of dependencies. This prevents the automatic installation of newly published malicious versions. This is a form of D3-ACH: Application Configuration Hardening.Two alleged 'TeamPCP' hackers arrested for orchestrating a massive supply-chain campaign, including 'Mini Shai-Hulud' worm, impacting over 1,000 organizations globally.
While patching is key, in this case it means updating to a *clean* version once available and ensuring malicious versions are purged.
Enforcing policies that only allow signed packages can help prevent the execution of tampered software, though this is challenging in ecosystems like npm.
Configure policies to block the execution of unsigned or untrusted scripts within build environments.
Run build processes in isolated, ephemeral containers with no access to sensitive credentials or network resources.
Train developers to scrutinize dependencies and be aware of the risks associated with package manager scripts.
To specifically counter the data exfiltration phase of the CHAINDROP attack, implement strict outbound traffic filtering on all developer workstations and, critically, within CI/CD build environments. By default, deny all outbound connections and create explicit allowlist rules only for necessary destinations, such as official package registries (e.g., registry.npmjs.org), version control systems, and internal artifact repositories. Since the malware exfiltrates stolen credentials to attacker-controlled C2 servers, this filtering can block the attack's final and most damaging step. Monitor for and alert on any connection attempts to unapproved domains or IP addresses originating from build agents or Node.js processes. This provides a crucial last line of defense, rendering the stolen credentials useless if they cannot be exfiltrated.
In the context of the CHAINDROP NPM attack, apply Application Configuration Hardening by enforcing the use of package lockfiles (package-lock.json or yarn.lock) across all projects. This ensures that every build uses a deterministic, vetted set of dependencies, preventing the automatic introduction of a newly published malicious version of a package like keyv. Additionally, configure npm to ignore scripts during installation (npm install --ignore-scripts) for routine dependency updates or in environments where they are not strictly necessary, and only enable them on a case-by-case basis after review. This directly mitigates the attack vector, as the preinstall script containing the worm would not be executed. This should be a standard practice in all CI/CD pipelines to create a more secure and predictable build process.
Implement dynamic analysis by running all CI/CD builds and dependency installations within an instrumented sandbox environment. This sandbox should monitor for suspicious behaviors indicative of the CHAINDROP worm, such as file system access outside of the project directory (e.g., reading ~/.npmrc or ~/.aws/credentials), unexpected network connections, or attempts to spawn new processes. By analyzing the behavior of the preinstall script at runtime, this technique can detect the malicious activity before the package is integrated into the final software artifact and before any credentials can be exfiltrated. Alerts should be triggered if a package installation process attempts any of these high-risk actions, immediately failing the build and flagging the dependency for security review. This directly counters the execution phase of the attack.
Elastic Security Labs is first alerted to the CHAINDROP campaign.
The Cyber Security Agency of Singapore (CSA) issues an advisory on the ongoing npm supply chain attack.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
CyberNetSec.io uses automation to assist source monitoring, deduplication, observable extraction, and structured intelligence generation. Published analysis follows human-defined editorial standards and adds defensive context including MITRE ATT&CK, D3FEND, STIX, and Sigma where applicable. Read our editorial policy.
Help others stay informed about cybersecurity threats
Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.
Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.
Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.
Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.
Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.