CHAINDROP Worm Compromises Over 1,300 NPM Packages

CHAINDROP Worm Hits 1,300+ NPM Packages in Massive Supply Chain Attack

CRITICAL
August 7, 2026
August 30, 2026
5m read
Supply Chain AttackMalwareThreat Actor

Related Entities(initial)

Products & Tech

Other

CHAINDROPShai-Hulud

Full Report(when first published)

Executive Summary

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.


Threat Overview

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-request
  • file-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.


Technical Analysis

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.

  1. Initial Infection: The attacker publishes a malicious version of a popular package (keyv).
  2. Execution: When a developer installs the malicious package, the preinstall script executes a dropper, often disguised with names like Math_Symbol.js or math_init.js.
  3. Data Exfiltration: The payload scours the compromised system for sensitive data, including credentials from .npmrc, .git-credentials, and AWS configuration files. It also targets cryptocurrency wallet files and AI-related API keys.
  4. Propagation: The worm uses the stolen npm credentials to publish malicious versions of other packages maintained by the compromised developer, continuing the cycle.

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.

MITRE ATT&CK Mapping


Impact Assessment

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.


IOCs — Directly from Articles

Type
String
Value
claude
Description
Author name used in malicious commits.
Type
String
Value
chore: update config
Description
Commit message used in malicious commits.
Type
File Name
Value
Math_Symbol.js
Description
One of the filenames used for the malicious payload.
Type
File Name
Value
math_init.js
Description
An alternative filename for the malicious payload.

Cyber Observables — Hunting Hints

Security teams may want to hunt for the following patterns to identify potential compromises related to this campaign:

Type
Command Line Pattern
Value
node Math_Symbol.js
Description
Execution of the malicious script during package installation.
Context
Process creation logs (Event ID 4688), EDR telemetry.
Type
File Path
Value
**/node_modules/**/Math_Symbol.js
Description
Presence of the malicious payload within the project's dependencies.
Context
File system scanning, File Integrity Monitoring (FIM).
Type
Network Traffic Pattern
Value
Outbound connections from build agents to unknown IPs
Description
Exfiltration of stolen credentials and data.
Context
Firewall logs, NetFlow, DNS query logs.
Type
File Content
Value
"preinstall": in package.json
Description
Suspicious commands in preinstall scripts.
Context
Source code scanners, CI/CD pipeline security tools.

Detection & Response

  1. Dependency Scanning: Use tools like npm audit or third-party Software Composition Analysis (SCA) solutions to identify vulnerable versions of keyv and other affected packages in all applications.
  2. Log Analysis: In CI/CD environments and on developer machines, search for process execution logs related to preinstall scripts that invoke suspicious files like Math_Symbol.js.
  3. Credential Rotation: Assume any credentials (npm, GitHub, AWS, etc.) on systems that have installed the malicious packages are compromised. Immediately revoke and rotate all potentially affected keys, tokens, and passwords.
  4. Network Monitoring: Monitor for and investigate anomalous outbound traffic from developer workstations and build servers, especially to destinations not on an allowlist. This aligns with D3-NTA: Network Traffic Analysis.

Mitigation

  1. Dependency Pinning: Use lockfiles (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.
  2. Vetting and Controls: Implement stricter controls around adding new dependencies. Use private npm registries to host vetted versions of open-source packages.
  3. Least Privilege for CI/CD: Ensure that CI/CD pipelines and build agents have only the minimum necessary permissions. Avoid storing long-lived, powerful credentials in these environments. Use short-lived tokens where possible.
  4. Developer Training: Educate developers on the risks of supply chain attacks and the importance of scrutinizing dependencies and their associated scripts. This aligns with MITRE Mitigation M1017: User Training.

Timeline of Events

1
August 4, 2026
Elastic Security Labs is first alerted to the CHAINDROP campaign.
2
August 6, 2026
The Cyber Security Agency of Singapore (CSA) issues an advisory on the ongoing npm supply chain attack.
3
August 7, 2026
This article was published

Article Updates

August 30, 2026

Two alleged 'TeamPCP' hackers arrested for orchestrating a massive supply-chain campaign, including 'Mini Shai-Hulud' worm, impacting over 1,000 organizations globally.

MITRE ATT&CK Mitigations

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.

D3FEND Defensive Countermeasures

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.

Timeline of Events

1
August 4, 2026

Elastic Security Labs is first alerted to the CHAINDROP campaign.

2
August 6, 2026

The Cyber Security Agency of Singapore (CSA) issues an advisory on the ongoing npm supply chain attack.

Sources & References(when first published)

Ongoing npm Supply Chain Attack Affecting Keyv and Related Packages ("Shai-Hulud" Worm)
Cyber Security Agency of Singapore (csa.gov.sg) August 6, 2026
Shai-Hulud strikes again: CHAINDROP worm hits 400+ npm packages
Elastic Security Labs (elastic.co) August 6, 2026

Article Author

Jason Gomes

Jason Gomes

• Cybersecurity Practitioner

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.

Threat Intelligence & AnalysisSecurity Orchestration (SOAR/XSOAR)Incident Response & Digital ForensicsSecurity Operations Center (SOC)SIEM & Security AnalyticsCyber Fusion & Threat SharingSecurity Automation & IntegrationManaged Detection & Response (MDR)

Editorial Standards & Analyst Review

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.

Tags

npmsupply chainwormShai-Huludkeyvcredential theftopen source

📢 Share This Article

Help others stay informed about cybersecurity threats

🎯 MITRE ATT&CK Mapped

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.

🧠 Enriched & Analyzed

Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.

🛡️ Actionable Guidance

Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.

🔗 STIX Visualizer

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 Generator

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.