Skip to main content
Back to Blog

PolinRider Explained: The Supply Chain Attack That Runs When You Import

What researchers have reported about PolinRider, how the loader works, and the checks worth running on your repositories and dependencies.

Kashyap Thakar
9 min
SecuritySupply Chainnpm
PolinRider Explained: The Supply Chain Attack That Runs When You Import

In early November 2026, Sonatype reported hidden loaders in 12 releases across 10 hijacked npm packages. The code matched a campaign researchers call PolinRider, which had been spreading through compromised GitHub repositories all year. This post summarises what security vendors have published about it, explains the two techniques that make it unusual, and lists checks you can run today. It is a summary of public reporting, not original malware analysis. The sources are linked at the end.

What PolinRider Is

PolinRider is the name given to a long-running supply chain campaign that plants a small JavaScript loader in places developers trust: their own repositories, popular config files, and published packages. Several vendors attribute it to North Korea-linked groups and connect it to the fake-job-interview lures known as Contagious Interview. Attribution is the researchers' claim, not something this post can verify, and it does not change what you need to check.

The reporting describes a campaign that kept widening:

  • Early 2026: loaders appear in compromised GitHub repositories. OpenSourceMalware later traced related code to npm packages from May 2025.
  • July 2026: Socket reported the campaign had reached 162 malicious release artifacts across 108 packages and extensions, spanning npm, Packagist, Go modules and Chrome extensions.
  • October 27, 2026: GitGuardian documented loaders in compromised repositories that used an Ethereum wallet to find their payload server.
  • November 2026: Sonatype and OX Security reported the same loader in hijacked npm packages. These were existing packages taken over, not new look-alikes.

How It Gets Into a Repository

The repository side of the campaign relies on files nobody reviews closely. GitGuardian's write-up of the October activity describes a hidden VS Code task that runs as soon as a folder is opened and executes a file disguised as a font:

// .vscode/tasks.json (pattern described in public reporting)
{
  "label": "eslint-check",
  "runOptions": { "runOn": "folderOpen" },
  "command": "node ./public/fonts/fa-solid-300.ttf"   // not a font
}

Other reports describe the same loader appended to ordinary config files, often pushed far to the right with whitespace so it stays off-screen in a diff. Files named in the reporting include tailwind.config.js, postcss.config.mjs, eslint.config.mjs and babel.config.cjs, plus fake .woff2 font files that contain JavaScript.

The point of this design is that opening a project is enough. If you clone a repository for a "take-home coding test" and VS Code trusts the folder, the task can run before you read a line of code.

Two Things That Make It Different

1. It runs at import time, not install time

Most npm malware of the last few years used a preinstall or postinstall script, which is why npm 12 turned dependency install scripts off by default in July 2026. The PolinRider loader found in November does not need them. According to Sonatype, it runs when an application imports the affected module or starts a bundled service.

npm install --ignore-scripts   // does not help here
import thing from "hijacked-package"   // this is the trigger

So --ignore-scripts and the npm 12 default are still worth having, but they do not cover this case. Code inside a dependency runs with the same privileges as your own code the moment you load it.

2. It finds its server through a blockchain

A normal loader contains a domain or IP address, and defenders block it. This one contains neither. It queries public Ethereum RPC endpoints, with Blockscout as a fallback, and reads transactions sent by a specific wallet. The transaction data tells it where the payload server currently is.

Ethereum holds only the pointer, not the malware. The attacker can move the server by sending a new transaction, and nobody can take a transaction down. Earlier PolinRider stages were reported using TRON, Aptos and BNB Smart Chain the same way. Researchers call this a dead-drop resolver.

The practical consequence: blocking one domain does not end the campaign, and outbound requests to a public blockchain RPC endpoint look harmless in most logs.

What the Payload Does

Public reporting describes the later stages as an information stealer: credentials, tokens, source code, and the ability to move further into the victim's environment. For a developer machine that means npm and GitHub tokens, cloud keys, SSH keys, .env files and browser-stored wallets. See environment variable best practices for why long-lived secrets on a laptop are the real prize.

How to Check Your Own Projects

These checks look for the patterns described above. A match is a reason to look closer, not proof of compromise, and a clean result is not a guarantee.

Tasks that run when a folder opens

grep -rn "folderOpen" --include=tasks.json .
git log --all --oneline -- .vscode/tasks.json

A legitimate project rarely needs a task that runs on open. If one exists, read the command it runs.

Fonts that are not fonts

find . -path ./node_modules -prune -o \
  \( -name "*.woff2" -o -name "*.woff" -o -name "*.ttf" \) -print0 | xargs -0 file

Real fonts are reported as font data. A "font" that file identifies as text or a script deserves attention.

Config files with something hiding off-screen

awk 'length > 1000 { print FILENAME ": line " FNR " is " length " chars" }' *.config.*

A config file with a line thousands of characters long, or with eval, Function( or long encoded strings, is not normal. Check git log -p on that file to see who added it and when. If a long string looks like Base64, the Base64 Decoder will show what it contains without running it.

Dependencies

  • Compare your lockfile against the affected versions in the vendor advisories. OX Security lists cdeops 13.5.31 among the packages taken down. The full tables are in the Sonatype and OX Security posts.
  • Search lockfiles, not only package.json. A hijacked package is usually a transitive dependency.
  • Look for unexpected outbound calls to Ethereum RPC or Blockscout hosts from build machines and servers that have no reason to talk to a blockchain.
  • Socket maintains a PolinRider tracker, and OpenSourceMalware publishes a scanner script. Use those for current indicators. Any list in a blog post goes stale.

If You Find It

  • Treat every secret that was on the machine as stolen: npm, GitHub, cloud, SSH, CI tokens and anything in .env files. Rotate them from a different, clean machine.
  • Review recent commits and releases made with your accounts. This campaign spreads through the accounts it steals.
  • Remove the loader from the repository history you ship, not only from the working tree, and tell anyone who cloned it.
  • Pin the affected dependency to a known clean version and reinstall from a clean cache.

Habits That Reduce the Risk

  • Open unfamiliar repositories in VS Code Restricted Mode, a container, or a throwaway VM. Do not click "Trust" to make a warning go away.
  • Be suspicious of interview tasks that require cloning and running a repository. That lure is how many of these infections start.
  • Commit lockfiles and install with npm ci so a new malicious release is not picked up silently.
  • Delay adoption of brand-new versions by a few days where you can. Most hijacked releases are caught within hours.
  • Keep long-lived credentials off developer machines. Short-lived tokens and hardware-backed keys limit what a stealer can take.
  • Restrict outbound network access from CI to the hosts a build actually needs.

The same account-takeover pattern drove this year's other large npm incident. See ChainDrop and Shai-Hulud: when a trusted package turns into a worm.

Sources

Written by

Spotted a mistake? Let me know