Sonatype found a concealed loader in 12 releases of 10 hijacked npm packages, and not one of them used an install hook. The code ran when an application loaded the module, then looked up its next server in an Ethereum wallet.
Key Takeaways
For several years the standard advice for a poisoned npm package has been to stop packages running code at install time. Turn off install scripts in CI, and a malicious postinstall hook never fires. The packages Sonatype flagged on November 4 were built for teams that took that advice. None of them carried an install hook. The malicious code sat inside files that applications load during normal operation, so it ran the moment a service imported the module or started up.
Sonatype Research Labs confirmed concealed runtime loaders in 12 npm releases across 10 hijacked packages, most of them under the @adminide-stack scope, along with server-hemera-mongo, cdeops, @cdmbase/wiki-browser and @pubngo-stack/help-browser. The packages do ordinary jobs, from Redux integration to health APIs, browser activity tracking and server examples. Six releases hide the loader with a Base64 string passed to eval, and the other six use a character-permutation bootstrap and the JavaScript Function constructor. In cdeops, for example, the bootstrap sits in the client.js file that loads when code calls require on the client path, ahead of the normal call to the real module.
Sonatype is direct about what that means for the most common defence. The manifests contain no consumer install or postinstall hooks, and the report states that disabling install scripts does not address code that runs during module loading or application startup. A build that installs with scripts turned off is still exposed the first time a test suite, a dev server or a production process imports the affected file.
“Blocking an individual server therefore does not disable the loader's ability to discover a replacement.”
Sonatype Research Labs
Once running, the loader queries public Ethereum RPC endpoints, with a block explorer API as a fallback, for transactions sent by one hard-coded wallet. It decodes IPv4 addresses from the recipient address bytes, then fetches XOR-encoded JavaScript over plain HTTP on TCP port 443. One payload runs through eval inside the application process and in a detached node process, and a second runs only in the detached process. Because the address is read from the chain, the operator can point every installed copy at a new server by sending one more transaction, and can change the JavaScript it serves without ever publishing another npm release.
That wallet is what ties these packages to PolinRider. GitGuardian's October 27 report identified the same address as the resolver for PolinRider loaders planted in compromised GitHub repositories, and notes that the campaign was originally attributed to North Korea. GitGuardian counted 188 commits pushed alongside a PolinRider loader, mostly amended in place and force-pushed between October 22 and 26. In those repositories the loader hid after a long run of whitespace in a project file or inside a fake font file, launched by a hidden .vscode/tasks.json task set to run when the folder is opened. Its later stage installs persistence and runs a Python stealer aimed at browser logins, cookies and wallet extensions. Sonatype adds that the shared wallet and infrastructure do not definitively establish that PolinRider and the separate GhostAction campaign share an operator.
The shift to import-time execution is new for this operation in npm. In May, Sonatype linked a hijacked package, @common-stack/generate-plugin with more than 1,100 weekly downloads, to PolinRider. That one appended its code to a postcss.config.js file, executed during installation and fetched its payload through the Tron blockchain, and a June update raised the count of compromised versions from two to 13.
The wider campaign has moved across ecosystems too. OpenSourceMalware tracked 1,951 compromised GitHub repositories across 1,047 owners by April, then almost 200 malicious release artifacts tied to 111 packages and extensions by July, including more than 80 Go modules and 10 Packagist packages. Its explanation for that spread is structural: Go and Packagist resolve packages straight from Git repositories, so write access to a GitHub account is effectively publish access. Each move has followed the controls defenders adopted, from install hooks to load-time code and from one registry to the next.
The lesson of these 12 releases is not that install-script controls were wrong. It is that a control aimed at one execution point tells attackers exactly where not to put their code. A dependency is trusted the moment an application imports it, and the only defence that holds at that point is knowing, before it is imported, that the package is what its maintainer actually published.
Guide
The hijacked npm releases carried no install hook for a script policy to catch, and this guide sets out how to vet registry packages before they reach a build and use SBOMs to find where each one landed.
Download
Datasheet
Finding which applications pulled in 12 poisoned releases means knowing every transitive dependency, and this datasheet explains how software composition analysis maps the open source packages inside each application you ship.
Download
Guide
PolinRider's later stage steals browser logins and session cookies from developer machines, and this guide explains how identity threat detection spots the stolen sessions and suspicious sign-ins that follow an infostealer infection.
Download
Alpine Linux patched a CVSS 10 GitLab flaw twice and stayed exposed, because the fix sat in GitLab's bundled Ruby.
An AI pipeline found 948 kernel flaws for about $1,279 each, and fixes are reaching maintainers far slower than the bugs were found.
In three of five AI coding assistants, one clicked local HTML file could read SSH keys and tokens anywhere on the disk.