LIVE · cybersecurity feed
Live wire
ai

Shai-Hulud strikes again: CHAINDROP worm hits 400+ npm packages

A new supply chain attack, dubbed "CHAINDROP" by researchers, has compromised over 400 npm packages, impacting libraries with over 1.3 billion monthly downloads. The attack, identified by Elastic Security Labs on August 4, 2026, involved the trojanization of the `keyv` monorepo and the deployment of a self-propagating worm. This campaign marks a return of the "Shai-Hulud" threat actor.

ZeroDay News ·

Source: Elastic Security Labs

A new supply chain attack, dubbed "CHAINDROP" by researchers, has compromised over 400 npm packages, impacting libraries with over 1.3 billion monthly downloads. The attack, identified by Elastic Security Labs on August 4, 2026, involved the trojanization of the `keyv` monorepo and the deployment of a self-propagating worm. This campaign marks a return of the "Shai-Hulud" threat actor.

The initial compromise targeted the maintainer of `keyv`, a widely used key-value storage library. The worm then leveraged stolen npm credentials to backdoor other packages to which the maintainer had publish rights. Key affected packages include `keyv` (over 600 million monthly downloads), `flat-cache` (nearly 580 million), `cacheable-request` (over 137 million), `cacheable` (over 30 million), and `cache-manager` (over 16 million).

The CHAINDROP worm operates via a `preinstall` hook in `package.json`, a legitimate npm feature that executes arbitrary commands before package installation. Every subpackage in the `keyv` repository was injected with a dropper, `setup.mjs`, which delivers the primary payload. The malware is designed for cross-platform compatibility, targeting Linux, macOS, and Windows.

The payload manifests as `Math_Symbol.js` in packages directly compromised from the `keyv` monorepo and `math_init.js` in packages infected during worm propagation. Both files share an identical SHA-256 hash. Worm-generated commits can be identified by the author name "claude" and the commit message "chore: update config".

Beyond npm package installation, the threat actor implemented additional execution paths. For users of Claude Code, a `SessionStart` hook in `settings.json` under the Claude directory will execute `node .claude/setup.mjs` upon session initiation. Similarly, for VS Code users, a `folderOpen` task in `tasks.json` will run `node .vscode/setup.mjs` when an infected repository is opened. If a stolen GitHub App token is available, the worm extends this by committing malicious hooks to up to 50 branches per accessible repository, injecting `.claude/settings.json` and `.vscode/tasks.json` into each.

The dropper, `setup.mjs`, first checks for the presence of the `bun` JavaScript runtime. If `bun` is not found, it detects the system's platform and architecture, then downloads `bun v1.3.13` directly from its official release page. After extraction, `bun` is used to execute the obfuscated payload, `Math_Symbol.js`. The temporary `bun` directory is subsequently deleted to obscure its activity.

The payload, a 711-kilobyte file, is heavily obfuscated using control-flow flattening and a Base91 string encoding scheme. It contains references to the "Dune" science fiction series, such as "laza," "kanly," and "sandworm," and exhibits similarities to previous Shai-Hulud campaigns.

A key component of the payload is a "collector" module designed for credential harvesting. This module scans for over 300 unique patterns across various credential stores on a developer's machine. It specifically targets AI tooling credentials from providers like Anthropic, Claude, Codex, Cursor, OpenAI, and Gemini, as well as cloud provider credentials for AWS, GCP, Azure, and Alibaba Cloud. Other targeted credentials include GitHub Personal Access Tokens (PATs), JWTs, session tokens, HashiCorp Vault tokens, SSH private keys, Kubernetes service account tokens, and npm tokens.

Stolen credentials are gzip-compressed and then encrypted with a randomly generated AES-256-GCM key. This AES key is subsequently RSA-encrypted using the attacker's hardcoded public key, ensuring that only the attacker with the corresponding private key can decrypt the data.

CHAINDROP does not hardcode a command-and-control (C2) domain. Instead, it queries an Ethereum smart contract at address `0xE1f2395ee43e45A1556EC6438a88c31B83493103` to retrieve the current exfiltration endpoint at runtime, utilizing multiple RPC providers as fallbacks. This mechanism allows the attacker to rotate C2 infrastructure without modifying the payload. During detonation runs, observed dead-drop domains included `awqhnjewqjkl[.]icu` and `npm-cache[.]com`.

If smart contract discovery fails, CHAINDROP searches GitHub commit history for a cryptographically signed marker, "thebeautifulmarchoftime," and validates any discovered C2 domain against an embedded RSA public key. As a final fallback, if both previous methods fail, CHAINDROP will exfiltrate data via a public GitHub repository, using "Dune"-themed names and the compromised victim’s account, with the description "Shai-Hulud: Here We Go Again."

The worm component activates upon the discovery of an npm token, provided the token has package write permissions and the ability to publish without two-factor authentication (`bypass_2fa`). Once a suitable token is found, the worm enumerates all packages the victim has publish rights to. For each writable package, it downloads the latest tarball from the npm registry, extracts it, injects the malicious components (`math_init.js` or `Math_Symbol.js` and `setup.mjs`), patches `package.json` to add the `preinstall` hook, bumps the patch version, and then re-packages and publishes the updated package back to the npm registry.

In this campaign, the commit message for these malicious updates includes the stolen GitHub token along with the string "IfYouBlockThisAPIKeyItWillCrashTheLiveProductionServersOfAllThirdPartyClients," an apparent attempt to deter developers from revoking the token.

ai
ShareXLinkedInWhatsAppFacebook

More News

view all →
breach

Criminal IP Introduces AITEM as the Next Evolution of Attack Surface Management

AI SPERA, the company behind the cyber threat intelligence platform Criminal IP, has announced AITEM (AI-Powered Threat Exposure Management), an expansion of its Attack Surface Management (ASM) offerings. AITEM aims to move beyond traditional asset discovery to provide a more comprehensive approach to understanding, prioritizing, and responding to security exposures. The platform is scheduled…

ai

AI Is Getting Really Good at Messing With Cybercriminals

Anti-cybercrime initiatives are increasingly deploying artificial intelligence to disrupt scammers by engaging them with lifelike bots, which the criminals mistake for genuine victims. This strategy aims to waste scammers' time and resources while gathering intelligence on their operations.

ai

The Third-Party Agent Problem: Why Security Built for AI You Chose Misses the Agents You Didn't

A new report highlights a significant blind spot in enterprise security architectures concerning the proliferation of third-party AI agents. The forthcoming 2026 State of Agent Security Report indicates that current security models, often designed to protect AI systems directly chosen and deployed by an organization, frequently fail to account for AI capabilities embedded within third-party…

security

Canadian cybersecurity executive arrested in federal extortion case

A Canadian cybersecurity executive was arrested in Pennsylvania on Thursday, facing federal charges of conspiracy to commit extortion. Edward Dubrovsky, 54, a co-founder and former Chief Operating Officer of CYPFER, a firm specializing in ransomware negotiation, is charged with conspiring to threaten the confidentiality of information for extortion and conspiring to commit Hobbs Act extortion,…

ransomware

FBI Arrests Ransomware Negotiation Firm Co-Founder in ShinyHunters Probe

The Federal Bureau of Investigation (FBI) has reportedly arrested Edward Dubrovsky, a co-founder of the ransomware negotiation firm Cypfer and currently associated with CyberSteward. The arrest is said to be part of the ongoing ShinyHunters investigation, specifically in connection with an incident involving FBI job applicant data.

security

Insider Cyber Extortion Plot Against Industrial Firm Lands Engineer in Prison

A former core infrastructure engineer has been sentenced to prison for an attempted cyber extortion plot against an industrial firm. The engineer reportedly deleted administrative accounts and reset hundreds of user passwords, subsequently demanding a ransom of 20 Bitcoin to prevent further disruption to the company's servers.