DEV Community

Cover image for The npm Supply Chain Attack That Used Ethereum as a Backdoor
TechDrifting.com
TechDrifting.com

Posted on Originally published at techdrifting.com

The npm Supply Chain Attack That Used Ethereum as a Backdoor

A hijacked npm package is not news anymore. What makes this particular npm supply chain attack, disclosed by Sonatype on November 4, 2026, worth a second look is what it took away: the ability to block the malware's server. The loaders hidden inside ten compromised packages do not call home to a domain or a fixed IP address, they read a transaction from a public Ethereum wallet and let the blockchain tell them where to go next. That single design choice turns a routine supply chain compromise into something closer to an infrastructure problem, and it is the part of this story most coverage is skimming past.

Key takeaways

  • Sonatype found 12 malicious releases across 10 hijacked npm packages that read a hardcoded Ethereum wallet's transactions to locate a malware server, a technique first tied to PolinRider loaders in GitGuardian's October 27, 2026 report on compromised GitHub repositories.
  • None of the releases used an npm install or postinstall script. The code runs when an affected file loads at runtime, so disabling install scripts, the standard advice since the 2018 event-stream incident, does not stop it.
  • The operator can repoint every infected machine to a new server by sending one more Ethereum transaction from the same wallet, without publishing a new npm release or touching a domain that defenders could seize or sinkhole.
  • Sonatype says the link between this campaign, the Lazarus Group, and the wider GhostAction operation is "substantial but not absolute," so treat the attribution as reported, not confirmed.

A Blockchain Transaction Is Now a Malware Command

According to Sonatype's security research team, the loaders hidden in the ten affected packages query public Ethereum RPC endpoints, with a Blockscout API fallback, for a transaction sent from one hardcoded wallet address. They then read the first four bytes of the transaction's recipient address as one IPv4 address and the next four bytes as a second one. From there, the loader fetches XOR-encoded JavaScript over plain HTTP on port 443, from the paths /0x/cls and /0x/ls, and runs it with eval, partly inside the running application and partly in a detached node process that keeps running after the app closes.

That is a genuinely different model from a typical command-and-control setup. A domain can be seized by a registrar or blocked by a DNS resolver. A fixed IP can be blackholed by an ISP or flagged by a threat feed within hours. A public blockchain transaction cannot be taken down by anyone, because no single party controls it. The operator needs only a few dollars of gas to publish a new transaction pointing at a new server, and every infected machine will find it the next time it checks the chain.

Why the Industry's Go-To Fix Does Not Apply Here

For years, the standard advice after an npm supply chain incident has been to audit and restrict install and postinstall scripts, since that is where most hijacked packages have hidden their payloads. Sonatype's analysis found no consumer-facing install or postinstall hooks in any of the 12 affected releases. The malicious code instead sits inside a file the application already imports and executes, triggering the moment that file loads. In one affected package, server-hemera-mongo, that happens the instant the application starts, through its own dist/main.js entry point referenced by its start script.

That matters because a security team that only reviewed install-time behavior, a common and reasonable first line of defense, would see nothing. The compromise lives in ordinary runtime code, mixed in with everything else a dependency does when your application actually runs. Open source maintainers are already stretched thin on security review, and this technique is built to slip past the one check that scaling, under-resourced teams lean on most.

Lines of code displayed on a laptop screen

Inside the npm Supply Chain Attack: Ten Packages, a Signature Researchers Already Knew

Sonatype's November 4 report lists specific affected packages and versions, including multiple releases of the @adminide-stack scope (client-redux, utils, forms-core, yantra-help-browser, health-api-server, and user-activity-browser), plus server-hemera-mongo, cdeops, @cdmbase/wiki-browser, and @pubngo-stack/help-browser. Six of the twelve releases hide the loader with a simple eval(atob(...)) Base64 trick, and six use a more deliberate character-permutation bootstrap built on JavaScript's Function constructor.

None of this came out of nowhere. Sonatype ties the wallet address directly to GitGuardian's October 27, 2026 report, "GhostAction Crosses Paths With PolinRider," which had already documented the same wallet resolving to the same /0x/cls and /0x/ls paths inside compromised GitHub repositories. In other words, researchers were watching this exact dead-drop mechanism in one ecosystem before it resurfaced in npm packages two and a half weeks later, which is also why Sonatype could identify and decode it as quickly as it did.

Network cables running through a server rack

The Honest Caveat: This Is a Small, Partly Unconfirmed Campaign

The strongest pushback on treating this as a watershed moment is straightforward: twelve releases across ten packages is a narrow footprint next to campaigns like the Mini Shai-Hulud npm worm, which Microsoft reported had spread through more than 400 packages. Several of the affected names here, such as the AdminIDE Stack packages, are not widely known, and some were already removed from the registry by the time research publications covered them. If your dependency tree never touched these packages, this specific incident does you no direct harm.

Attribution is also softer than some headlines suggest. Sonatype's own write-up states plainly that while the shared wallet and matching URL paths support linking this campaign to the broader GhostAction and PolinRider activity, "the evidence does not definitively establish" that the two share a single operator, and a Lazarus Group attribution tied to related PolinRider activity remains unconfirmed rather than independently verified by Sonatype itself. The honest read is that the technique is the real news, not a tidy villain-and-motive story, and coverage that states the Lazarus link as settled fact is getting ahead of what the primary researchers actually confirmed.

A glowing chain link representing blockchain technology

Who Needs to Act Now, and Who Can Treat This as a Warning Shot

This matters most to teams running Node.js services with deep, frequently updated dependency trees, especially internal tools, build pipelines, and anything with access to cloud credentials or source control. If your organization uses a dependency firewall or private registry mirror, check now whether any of the twelve flagged releases were ever pulled in, even transitively.

You can treat this as background context rather than an emergency if you ship a small, pinned dependency set that you already audit on updates, and none of the named packages or their publishers appear anywhere in your lockfiles. That said, the underlying lesson, that runtime code execution bypasses install-script scrutiny, applies to every Node.js project regardless of whether this exact campaign reached you.

Someone typing on a keyboard in a dark office

  • Search package-lock.json, yarn.lock, and pnpm-lock.yaml, plus any internal npm mirrors and build caches, for the twelve affected release strings Sonatype published.
  • Do not assume a clean install log means you are safe. A lockfile entry alone is not proof the code ran, and an import error afterward does not prove it did not run first.
  • Check outbound logs for plain HTTP requests to port 443 on paths starting with /0x/cls or /0x/ls, and for detached node -i child processes spawned with piped stdin.
  • If you find a match, rotate npm publishing tokens, CI secrets, cloud keys, and source control credentials on any host where the package ran, since Sonatype notes those are exactly what this loader is positioned to reach.

What to Watch Next

Expect two things to follow. First, more npm or PyPI campaigns borrowing the same blockchain-as-resolver trick, since it is now public, documented, and cheap to copy even for unrelated attackers with no connection to PolinRider. Second, pressure on registries and dependency-scanning vendors to add detection for the specific pattern here, hardcoded wallet addresses combined with RPC calls inside dependency code, rather than relying on install-script auditing alone. That pressure lands on defenders who, as Microsoft's own 2026 Digital Defense Report found, are already struggling to close the gap between when an attack technique becomes public and when detection catches up. Neither fix is trivial, because scanning for "a dependency that talks to a blockchain" will also flag a lot of legitimate Web3 tooling.

The realistic takeaway for most developers is not panic, it is a checklist item: the next time you review a dependency security report, ask specifically whether the compromise required an install script, because this campaign is proof that assumption can no longer carry the weight the industry has been putting on it.

Sources

Top comments (0)