# 'ChainDrop' self-propagating worm compromises hundreds of popular npm packages (keyv, cacheable ecosystem) via Bun-loaded credential stealer with Ethereum dead-drop C2

> On 2026-08-04 attackers who compromised the jaredwray/keyv maintainer's GitHub account published malicious versions of keyv, cacheable, flat-cache, file-entry-cache and related packages (>150M weekly downloads for keyv alone) through the project's own release pipeline. A preinstall loader (setup.mjs) fetches the Bun runtime and runs an obfuscated stealer (math_init.js / Math_Symbol.js) that harvests npm, GitHub, AWS, Kubernetes, Vault and AI-tool credentials and re-publishes infected packages with stolen npm tokens. Package-count estimates range from ~444 (StepSecurity) to 1,300+ (press).

- **Published:** 2026-08-04T00:00:00Z
- **Last reviewed:** 2026-11-17T02:54:00.877Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-2822
- **ID:** TL-2026-2822
- **Severity:** CRITICAL
- **Category:** SUPPLY_CHAIN
- **Status:** ACTIVE
- **Detections:** 9 (1 shown free below) · **IOCs:** 40 (3 shown free below)

## Description

ChainDrop is a self-propagating npm supply-chain worm that surfaced on 2026-08-04. Attackers took over the GitHub account of the keyv/cacheable maintainer and pushed an unsigned commit (ee2681a, replaying a 27-file delta onto main) adding setup.mjs, Math_Symbol.js and a preinstall script, plus camouflage commits by a fake 'claude' bot adding IDE/AI hooks. keyv@6.0.0 was then published at ~09:35 UTC through the legitimate GitHub Actions OIDC trusted-publishing pipeline, carrying genuine SLSA provenance in Rekor; the same payloads were reused across ten cacheable workspaces (nine versions published 10:09-10:14 UTC) and ecto@5.0.1. Eleven 'worm carrier' packages were hit directly (keyv 6.0.0, flat-cache 6.1.24, file-entry-cache 11.1.6, cacheable-request 13.0.20, cacheable 2.5.1, cache-manager 7.2.10, @cacheable/utils 2.5.1, @cacheable/memory 2.2.1, @cacheable/node-cache 3.1.2, @cacheable/net 2.1.1, ecto 5.0.1). StepSecurity counted 444 poisoned packages / 2,212 malicious versions (433 victim packages republished with stolen credentials, incl. scopes @servicetitan, @onereach, @or-sdk, @ornikar, @qlik, @nebula.js); BleepingComputer and others cite 868-1,300+ packages and ~2 billion monthly downloads. npm began rolling unpublishes at ~10:39 UTC.

Stage 1, setup.mjs, is run by the npm preinstall lifecycle script. It accepts any working 'bun' binary or downloads official Bun v1.3.13 from github.com/oven-sh/bun releases (Linux x64/arm64 glibc/musl, macOS, Windows) with no integrity verification, then executes stage 2 (math_init.js / Math_Symbol.js, ~727 KB, Bun-bundled). Stage 2 is protected by Base91 string tables with 73 alphabet permutations, a PBKDF2-SHA256 (200k iterations) custom cipher and AES-256-GCM+gzip blobs. Outside CI it respawns itself detached (_NODE_RUNTIME_INIT=1 guard, single-instance lock tmp.dpkg_14527.lock) and contains an unreachable Russian-language geofence.

Stage 2 scans the filesystem (290 Linux / 129 macOS / 50 Windows path patterns: env files, shell history, SSH keys, git/npm/PyPI creds, AWS/Azure/GCP, Kubernetes, Docker, Vault, Terraform, CI/CD secrets, Copilot/Claude configs, crypto wallets, VPN configs, /etc/shadow, /proc/self/environ). On GitHub Actions Linux runners with sudo it dumps Runner.Worker memory via /proc/<pid>/mem with an embedded Python script and extracts isSecret:true values (dropping github_token). It walks the AWS credential chain (env, web identity, ECS, IMDSv2, profiles), reads Secrets Manager across 17 regions and SSM Parameter Store with decryption, queries STS, dumps in-cluster Kubernetes Secrets and HashiCorp Vault KV values. With a classic GitHub token holding workflow scope it pushes a branch (dependabot/github_actions/format/setup-formatter) with a workflow (codeql_analysis.yml, named 'Run Copilot') that writes toJSON(secrets) to format-results.txt as an artifact, downloads it and deletes the run and branch.

Propagation is triple-pronged: (1) stolen granular npm tokens with bypass_2fa and write permission are used to download the latest tarball, inject setup.mjs/math_init.js, replace scripts with {"preinstall":"node setup.mjs"}, bump the patch version and republish; (2) with GitHub credentials it commits .vscode/tasks.json, .claude/settings.json, .claude/setup.mjs, .vscode/setup.mjs and .claude/math_init.js to up to 50 branches per repo, so the loader re-runs when a developer opens the folder in VS Code or starts a Claude session (cross-linked persistence); (3) when running in an opensearch-js release-drafter workflow it mints a valid Sigstore/SLSA provenance and OIDC npm publish token to publish a poisoned @opensearch-project/opensearch with an optional dependency pinned to a GitHub commit.

C2: stage 2 calls eth_call (selector 0x53ed5143) on Ethereum contract 0xE1f2395ee43e45A1556EC6438a88c31B83493103 across 73-75 public RPC endpoints to retrieve current C2 domains, health-checks GET /router (HTTP 400/404 = healthy) and POSTs an RSA-OAEP-SHA256 + AES-256-GCM encrypted, gzipped JSON envelope to /router. The response may carry a 'code' field that is passed to eval() (unsigned, arbitrary remote JavaScript execution). Fallback: GitHub commit search for 'thebeautifulmarchoftime' with RSA-signed commit markers, and GitHub exfiltration repositories (Dune-themed names, description 'Shai-Hulud: Here We Go Again') with a token-relay marker in commit messages. Unit 42 found 453 public exfiltration repositories, domains registered 2026-05-22 and a resolver contract deployed 2026-05-25, and a new DGA-like C2 domain awqhnjewqjkl.icu registered on 2026-08-04.

Attribution: none confirmed. Tooling overlaps Shai-Hulud / Shai-Hulud 2.0 / Mini Shai-Hulud (Bun at preinstall, isSecret:true Runner.Worker memory grep, self-republish with stolen tokens, Bun 1.3.13 pin, PBKDF2 decoder); Unit 42 states it cannot definitively attribute it to TeamPCP. Dormant token-monitor persistence (gh-token-monitor LaunchAgent/systemd) is embedded but not invoked; OPSWAT notes the malware may monitor for credential revocation, so image systems before rotating.

## MITRE ATT&CK

- T1195.002 Compromise Software Supply Chain
- T1059.007 JavaScript
- T1546 Event Triggered Execution
- T1027 Obfuscated Files or Information
- T1552.001 Credentials In Files
- T1552.005 Cloud Instance Metadata API
- T1552.007 Container API
- T1555.006 Cloud Secrets Management Stores
- T1528 Steal Application Access Token
- T1003.007 Proc Filesystem
- T1550.001 Application Access Token
- T1102.001 Dead Drop Resolver
- T1071.001 Web Protocols
- T1573.002 Asymmetric Cryptography
- T1567.001 Exfiltration to Code Repository
- T1078.004 Valid Accounts: Cloud Accounts
- T1070.004 Indicator Removal: File Deletion
- T1105 Ingress Tool Transfer
- T1041 Exfiltration Over C2 Channel

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**ChainDrop Stage 1 — npm Preinstall Loader (node setup.mjs) or Known-Poisoned Package Install** (`TL-2026-2822-SPL-001`)

Detects the ChainDrop worm's entry point: the npm preinstall lifecycle script running 'node setup.mjs' (the Bun loader that downloads Bun v1.3.13 and launches the stage 2 stealer), and explicit installs of the known-poisoned releases (keyv@6.0.0, flat-cache@6.1.24, file-entry-cache@11.1.6, cacheable-request@13.0.20, cacheable@2.5.1, cache-manager@7.2.10, @cacheable/utils|memory|node-cache|net, ecto@5.0.1). Catches developer workstations and CI runners at the moment of compromise, before credential theft begins.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1195.002, T1059.007
- **Data sources:** sysmon, sysmon_for_linux, microsoft_defender_for_endpoint, process_creation
- **Severity:** high
- **Confidence:** high

### Splunk SPL

````spl
index=sysmon sourcetype IN ("XmlWinEventLog:Microsoft-Windows-Sysmon/Operational","sysmon:linux") EventCode=1 earliest=-24h
```ChainDrop stage 1: npm lifecycle script runs node setup.mjs, or an explicit install of a known-poisoned release```
| eval img=lower(Image), cmd=lower(CommandLine), pimg=lower(ParentImage), pcmd=lower(ParentCommandLine)
| eval is_node=if(like(img,"%/node") OR like(img,"%node.exe"),1,0)
| eval pkg_mgr_parent=if(like(pcmd,"%npm%") OR like(pcmd,"%pnpm%") OR like(pcmd,"%yarn%") OR like(pimg,"%/sh") OR like(pimg,"%/bash") OR like(pimg,"%cmd.exe"),1,0)
| eval is_install=if(like(cmd,"%npm install%") OR like(cmd,"%npm i %") OR like(cmd,"%npm ci%") OR like(cmd,"%pnpm add%") OR like(cmd,"%pnpm install%") OR like(cmd,"%yarn add%"),1,0)
| eval bad_pkg=if(match(cmd,"(keyv@6[.]0[.]0|flat-cache@6[.]1[.]24|file-entry-cache@11[.]1[.]6|cacheable-request@13[.]0[.]20|cacheable@2[.]5[.]1|cache-manager@7[.]2[.]10|@cacheable/(utils@2[.]5[.]1|memory@2[.]2[.]1|node-cache@3[.]1[.]2|net@2[.]1[.]1)|ecto@5[.]0[.]1)"),1,0)
| eval signal=case(is_node=1 AND like(cmd,"%setup.mjs%") AND pkg_mgr_parent=1, "preinstall_loader_node_setup_mjs", is_install=1 AND bad_pkg=1, "known_poisoned_package_install", true(), null())
| where isnotnull(signal)
| stats count min(_time) AS first_seen max(_time) AS last_seen values(signal) AS signals values(CommandLine) AS cmdlines values(ParentCommandLine) AS parent_cmdlines BY host, User
| convert ctime(first_seen) ctime(last_seen)
````

### Microsoft KQL

```kql
DeviceProcessEvents
| where Timestamp > ago(24h)
| extend img = tolower(FileName), cmd = tolower(ProcessCommandLine), pimg = tolower(InitiatingProcessFileName), pcmd = tolower(InitiatingProcessCommandLine)
| extend BadPackage = cmd matches regex @"(keyv@6[.]0[.]0|flat-cache@6[.]1[.]24|file-entry-cache@11[.]1[.]6|cacheable-request@13[.]0[.]20|cacheable@2[.]5[.]1|cache-manager@7[.]2[.]10|@cacheable/(utils@2[.]5[.]1|memory@2[.]2[.]1|node-cache@3[.]1[.]2|net@2[.]1[.]1)|ecto@5[.]0[.]1)"
| extend Signal = case(
    img in ("node", "node.exe") and cmd contains "setup.mjs" and (pimg in ("npm", "npm.cmd", "pnpm", "yarn", "sh", "bash", "cmd.exe") or pcmd has_any ("npm", "pnpm", "yarn")), "preinstall_loader_node_setup_mjs",
    BadPackage and cmd has_any ("install", "add", "ci", "i"), "known_poisoned_package_install",
    "")
| where Signal != ""
| summarize FirstSeen = min(Timestamp), LastSeen = max(Timestamp), Events = count(), Signals = make_set(Signal), CommandLines = make_set(ProcessCommandLine, 10), ParentCommandLines = make_set(InitiatingProcessCommandLine, 10) by DeviceName, AccountName
```

### Sigma

```yaml
title: ChainDrop npm Preinstall Loader or Known-Poisoned Package Install
id: b7a1c2d4-3e5f-4a60-8b71-9c0d1e2f3a41
status: experimental
description: Detects the ChainDrop npm worm stage 1 loader (node setup.mjs launched from an npm/pnpm/yarn lifecycle script or shell) and explicit installs of the known-poisoned keyv/cacheable ecosystem releases published on 2026-08-04.
references:
  - https://unit42.paloaltonetworks.com/chaindrop-npm-worm-analysis/
  - https://www.stepsecurity.io/blog/chaindrop-npm-worm
  - https://securitylabs.datadoghq.com/articles/npm-worm-compromises-popular-npm-packages/
author: Threadlinqs Team
date: 2026-10-01
tags:
  - attack.initial-access
  - attack.t1195.002
  - attack.execution
  - attack.t1059.007
logsource:
  category: process_creation
detection:
  selection_node:
    Image|endswith:
      - '/node'
      - 'node.exe'
    CommandLine|contains: 'setup.mjs'
  selection_parent_pkgmgr:
    ParentCommandLine|contains:
      - 'npm'
      - 'pnpm'
      - 'yarn'
  selection_parent_shell:
    ParentImage|endswith:
      - '/sh'
      - '/bash'
      - 'cmd.exe'
  selection_install_verb:
    CommandLine|contains:
      - 'npm install'
      - 'npm i '
      - 'npm ci'
      - 'pnpm add'
      - 'pnpm install'
      - 'yarn add'
  selection_known_bad_package:
    CommandLine|contains:
      - 'keyv@6.0.0'
      - 'flat-cache@6.1.24'
      - 'file-entry-cache@11.1.6'
      - 'cacheable-request@13.0.20'
      - 'cacheable@2.5.1'
      - 'cache-manager@7.2.10'
      - '@cacheable/utils@2.5.1'
      - '@cacheable/memory@2.2.1'
      - '@cacheable/node-cache@3.1.2'
      - '@cacheable/net@2.1.1'
      - 'ecto@5.0.1'
  condition: (selection_node and 1 of selection_parent_*) or (selection_install_verb and selection_known_bad_package)
falsepositives:
  - Legitimate projects that ship their own setup.mjs and invoke it from an npm script
  - Developers deliberately installing the affected versions in an isolated analysis sandbox
level: high
```

**Known false positives:**

- Internal packages that legitimately run a setup.mjs from a preinstall/postinstall script
- Security researchers detonating the poisoned versions in a lab

**Tuning notes:** Allow-list internal repos that own a setup.mjs by ParentCommandLine working directory or package name. Treat the preinstall_loader signal as high fidelity when Image resolves inside node_modules. Extend the poisoned-version regex as the maintainers' clean re-releases and additional republished victim packages (@servicetitan, @onereach, @or-sdk, @ornikar, @qlik, @nebula.js) are catalogued.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- ChainDrop Payload Artifacts on Disk — [indicator], math_init.js, [indicator] and Known SHA256s (locked: unlock with TL Creds)
- ChainDrop Cloud Credential Harvest — AWS Secrets Manager / SSM Sweep Across Many Regions (locked: unlock with TL Creds)
- ChainDrop Ethereum Dead-Drop C2 — node/bun Contacting Public Ethereum RPC Endpoints (locked: unlock with TL Creds)
- ChainDrop Stage 2 — Bun Runtime Executing Obfuscated math_init.js / [indicator] (locked: unlock with TL Creds)
- ChainDrop Repo-Level Persistence — [indicator], [indicator] Hooks, Injected Workflow and Token Monitor (locked: unlock with TL Creds)
- ChainDrop C2 — Known C2 Domains, /router Encrypted Envelope and GitHub Commit-Search Dead Drop (locked: unlock with TL Creds)
- ChainDrop Post-Exploitation — Runner.Worker Memory Scraping via sudo/Python (/proc/<pid>/mem) (locked: unlock with TL Creds)
- ChainDrop GitHub Propagation and Exfiltration — Dune-Themed Repos and 'Run Copilot' Secret-Dump Workflow (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sample indicators (3 of 40)

Defanged, TLP:CLEAR.

- Domain: `npm-cache[.]com`
- File hash: `9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc`
- Domain: `awqhnjewqjkl[.]icu`

Full set of 40 indicators unlocks with TL Creds: https://threadlinqs.com/tl-creds

## Sources

- ['ChainDrop' worm compromises hundreds of popular npm packages (Datadog Security Labs)](https://securitylabs.datadoghq.com/articles/npm-worm-compromises-popular-npm-packages/)
- [ChainDrop npm Worm: Bun-loaded CI/CD credential harvester with Ethereum dead-drop C2 (StepSecurity)](https://www.stepsecurity.io/blog/chaindrop-npm-worm)
- [ChainDrop: Inside a Self-Propagating npm Worm (Unit 42)](https://unit42.paloaltonetworks.com/chaindrop-npm-worm-analysis/)
- [Massive ChainDrop npm supply-chain attack infects hundreds of packages (BleepingComputer)](https://www.bleepingcomputer.com/news/security/massive-chaindrop-npm-supply-chain-attack-infects-hundreds-of-packages/)
- [ChainDrop: The Mini Shai Hulud npm worm's latest wave hits keyv and cacheable (Expel)](https://expel.com/blog/chaindrop-the-mini-shai-hulud-npm-worms-latest-wave-hits-keyv-and-cacheable/)
- [Shai-Hulud Returns: ChainDrop Worm Hits npm, Infecting Hundreds of Packages (OPSWAT)](https://www.opswat.com/blog/shai-hulud-returns-chaindrop-worm-hits-npm-infecting-hundreds-of-packages)
- [ChainDrop npm Worm Hits 1,300 Packages and 2 Billion Monthly Downloads (protect.computer)](https://protect.computer/news/2026-08-04-chaindrop-npm-worm-keyv/)
- [ChainDrop npm worm hits 400+ packages (SupplierShield)](https://www.suppliershield.com/post/chaindrop-npm-supply-chain-worm)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-2822
