LIVE · cybersecurity feed
Live wire
security

ChainDrop: Inside a Self-Propagating npm Worm

Analysis of ChainDrop, an npm supply chain worm extracting GitHub Actions runner secrets and using Ethereum smart contracts for C2 routing. The post ChainDrop: Inside a Self-Propagating npm Worm appeared first on Unit 42.

zeroday.news ·

A self-propagating npm worm, dubbed "ChainDrop," has infected over 400 packages, including widely used ones like `keyv` and `cacheable-request`, which collectively see hundreds of millions of downloads weekly. The worm is designed to steal various sensitive developer data and credentials, potentially exposing developer workstations, continuous integration (CI) pipelines, cloud environments, and downstream software users across numerous organizations.

Once installed, ChainDrop targets cloud credentials, npm and GitHub tokens, SSH keys, and other sensitive developer information. It can also extract temporary credentials from GitHub Actions runner memory. The stolen npm publishing tokens are then used to infect and republish additional packages, maintaining their original functionality while embedding the worm.

Researchers observed 453 public GitHub repositories across five accounts matching the worm’s exfiltration patterns, and detected ChainDrop execution in 10 distinct environments. These repositories have since been removed. The malware achieves persistence through developer and AI coding tools and uses blockchain-based command-and-control (C2) resolution. On August 4, 2026, the attackers reconfigured the worm's entire C2 infrastructure through a single Ethereum transaction, bypassing the need for malware updates.

The infection mechanism is subtle: an infected npm package's `package.json` file is modified with a `preinstall` command. This command points to `setup.mjs`, a dropper that checks for the presence of Bun, a lightweight JavaScript runtime. If Bun 1.3.13 is not found, it is downloaded from the legitimate Oven GitHub repository. Bun is then used to execute a 727 KB obfuscated JavaScript payload, `math_init.js`, which is compressed into two source lines.

The payload spawns a detached background process and sets `_NODE_RUNTIME_INIT=1` to prevent recursive relaunch, allowing the package installation to complete without errors or warnings. In CI environments, the worm runs inline, making its debug output visible in workflow logs, which can serve as an indicator for defenders. Before engaging in data collection, the worm performs a locale check; if a Russian-language host is detected, it exits cleanly, printing "Exiting as russian language detected!"

The worm harvests a wide array of credentials and system information. This includes temporary identity and access management (IAM) role credentials from cloud infrastructure platforms by querying metadata and token endpoints of compute instances and container services. It also targets Docker and Helm configurations, Git credentials, mount listings, Poetry and PyPI credentials, RubyGems tokens, SSH keys, Terraform state, and Vault tokens.

Beyond developer tooling, ChainDrop seeks credentials from AI-assisted coding tools, cloud-based development platforms, and open-source coding assistant configurations. It also collects data from `.env` files, `.netrc` files, application configurations, Bitcoin and Electrum wallet files, Jenkins encrypted credential material, Kubernetes service-account tokens and kubeconfigs, and shell histories. Crucially, the npm and GitHub tokens it finds are essential for its continued propagation.

An embedded Python helper within the payload is responsible for scraping GitHub Actions runner memory. This helper, hidden in an encrypted blob, locates the `Runner.Worker` process, opens `/proc/pid/maps` and `/proc/pid/mem`, and searches for OpenID Connect (OIDC) tokens and runner secrets.

To mitigate such threats, it is recommended to identify and remove affected npm package versions, investigate developer workstations and CI runners for signs of compromise, and review unexpected npm publishing and GitHub repository activity. Additionally, potentially exposed npm, GitHub, cloud, SSH, and automation credentials should be revoked and rotated, identified persistence mechanisms removed, and both domain-based and GitHub-based exfiltration channels blocked.

ShareXLinkedInWhatsAppFacebook

More News

view all →
vulnerability

N-able God mode flaw: Vendor confirms attackers reached customer networks as second hotfix lands

Attackers turned admin access into a route downstream, while N-able tells N-central customers to patch – again

ai

Irregular, firm behind AI hacking incidents, won't say if there were more

A spokesperson said Irregular’s investigation into what happened with Anthropic, OpenAI and Meta's AI models was ongoing and that they could not “go into further details.”

data center technology

In Other News: AI Slop Limits Apple Bounties, North Carolina Port Attacks, Hackers Target Wall Street

Several cybersecurity incidents are highlighted, including a ban on Chinese data center technology, a supply chain attack on QuickFox VPN, and a phishing breach at IEH Corporation. Additionally, AI-generated content may be impacting Apple's bug bounty program, and a North Carolina port experienced an attack, alongside broader targeting of Wall Street.

security

North Carolina Ports confirms cyberattack disrupting operations

The North Carolina Ports Authority has confirmed that a cyberattack disrupted IT systems and slowed operations at Port of Wilmington, Port of Morehead City, and Charlotte Inland Port. [...]

cloud

Unveiling good and bad behaviors on the Agentic Internet

Cloudflare is shifting bot mitigation from point-in-time Risk assessment to continuous Trust evaluation. Learn how new good and bad behaviors from bots and agents are assessed by our systems, including BotBase and Precursor — and try out our Precursor Trace simulation to see how your own cursor movements would be assessed as human or bot.

ai

Introducing Radar Researcher: An AI tool for exploring Internet data in plain language

Cloudflare Radar Researcher is a new AI-powered tool that lets you explore global Internet trends and traffic data using plain language. Built entirely on Cloudflare's Developer Platform, it turns natural language queries into real, interactive charts.