A malware campaign that researchers call PolinRider has moved deeper into GitHub. It no longer sits only in throwaway repositories that wait for someone to clone them. It now gets into the pull requests of established open-source projects. Two security vendors published new findings this week. SafeDep found a Python loader in 375 public repositories. StepSecurity found that rewritten commits had been force-pushed into pull requests at AsyncAPI, CircuitVerse and Open Food Facts. At CircuitVerse and Open Food Facts the project's automated build system ran the malicious code.

The Hacker News summarised the research on Nov. 26 and described PolinRider as linked to North Korean threat actors. That label comes from the security-research community as relayed by The Hacker News. None of the three sources we read cites a government attribution. Treat it as an industry assessment, not an official finding.

What did SafeDep find?

On Nov. 24, SafeDep reported finding the loader in 375 public repositories owned by 260 GitHub accounts. Of those repositories, 370 had received a push in November, so the activity is current. The code was hidden in one of two places that developers rarely read closely. One is a conftest.py file, the configuration file the pytest testing framework loads automatically. The other is a utils package, the generic helper folder found in almost every Python project. SafeDep counted 12 conftest.py copies among the 375 files; most sit in a planted utils-style package.

The loader does not carry its main payload. It fetches JavaScript stored in an Ethereum transaction. Every transaction on Ethereum can carry a block of arbitrary data, and that data stays permanently readable on the public blockchain. To an attacker this has two advantages. No hosting provider can take the payload down, and the operator can swap in new code just by sending a new transaction.

SafeDep says the wallet behind the campaign sent eight transactions to itself between Oct. 24 and Nov. 11, which fits with updating the stored payload. A second wallet has pointed to a command-and-control (C2) server at 95.135.181[.]84 since Nov. 12. The address is written in "defanged" form here so it cannot be clicked. SafeDep says no package on PyPI or npm carries the loader. The campaign spreads through repositories, not package registries. A GitHub user first reported it in issue #96 of the polinrider-scanner repository.

How did it get into real projects?

StepSecurity published its findings on Nov. 26. It traced the activity to a GitHub account named Eternity0207, which opened 217 pull requests across open-source projects. Maintainers merged 145 of them, and StepSecurity says none of the merged pull requests contains the loader. The account therefore had a record of ordinary, accepted contributions.

The loader arrived in a different way. According to StepSecurity, rewritten commits carrying it were force-pushed into pull requests that were still open on Oct. 19. A force-push replaces a branch's history instead of adding to it. At AsyncAPI, each malicious commit stayed on its branch for 30 to 40 minutes before another force-push replaced it, leaving a clean final diff. GitHub suspended the account on Nov. 25.

StepSecurity names three affected projects: AsyncAPI, CircuitVerse and Open Food Facts. The damage was worst at CircuitVerse. Its pull request workflows, including the release workflow that builds the desktop installers, ran the loader without an approval step, and the maintainers deleted 40 installers the workflow had published. At Open Food Facts the CI workflow also ran on the poisoned commits, and the maintainers rotated a secret. StepSecurity notes that no project has reported stolen secrets. AsyncAPI's CI did not run the code, because fork pull request workflows there need a maintainer's approval. StepSecurity also checked a wider set of 622 repositories and found the loader in 576 of them, spread across 311 accounts.

So is it 375 repositories or 7,600?

The Hacker News headline says PolinRider has poisoned more than 7,600 GitHub repositories. In the article body, that figure is attributed to estimates from Apiiro, which says PolinRider has been detected in at least 7,609 GitHub repositories owned by 2,330 accounts. We did not read Apiiro's own report, so we cannot confirm that number independently. The other counts are narrower and come from the vendors' own searches: SafeDep's 375 repositories with the Python loader, and StepSecurity's 576 of 622 checked repositories carrying the JavaScript loader. The counts differ partly because each vendor measured a different variant of the loader, and possibly because they searched at different times.

Where does this fit in North Korea's playbook?

The Hacker News describes several ways PolinRider reaches developers:

  • Fake recruiter sites. The report names BlockNovas, AccuraSoftHire and HuntRole. These lures trick prospective targets into running malware-laced projects under the pretext of a take-home assessment.
  • Hijacked maintainer accounts. The report describes publishing malicious packages across open-source ecosystems by hijacking maintainer accounts.
  • VS Code auto-run tasks. These are editor tasks set to run automatically when a project folder is opened, so simply opening the repository can be enough.
  • Git history rewriting. Compromised developer machines are used to steal GitHub tokens and force-push malicious commits into repositories the victim can reach. This is the force-push technique StepSecurity documented.

The report says PolinRider is assessed to be a sub-cluster operating in parallel with Contagious Interview, a long-running campaign that is a social-engineering entry point for compromising developer systems. It also cites Palo Alto Networks' Unit 42 on North Korean state-sponsored use of open-source registries as an initial access vector. The pattern is familiar. Developers hold credentials, signing keys and access to build pipelines, and getting malicious code into a trusted project's workflow can reach many more people than phishing a single person.

The loaders differ in how they start. StepSecurity found JavaScript copies that run through a build script prefix, a test or build config file, or a VS Code task that runs when the folder is opened. SafeDep found that its Python loader runs when pytest collects tests through conftest.py, or when Python imports the planted package. In the three example applications SafeDep checked, the documented start commands failed with an import error before the loader ran. That matters most in CI, where tests and builds run without a human watching.

What It Means for Defenders

Who is affected: anyone who maintains a public GitHub repository and accepts outside contributions, any organisation whose CI pipelines run code from pull requests, and developers who clone and open unfamiliar repositories. That last group includes candidates handed coding tests by recruiters. Small teams and volunteer-run projects may be the most exposed, because a run of good contributions is often all it takes to earn trust.

There is no software patch for this. It abuses normal GitHub and tooling features, so the mitigations are about process:

  • Audit test, build and helper files. Review recent changes to conftest.py files, utils packages, build config files and package.json scripts, especially changes from outside contributors. Treat any code in them that contacts a blockchain endpoint or downloads and runs remote content as a serious warning sign.
  • Check pull request history for force-pushes. GitHub records when a pull request branch was force-pushed. If a contribution changed after review, review it again before merging or re-running it. Look harder at contributors with many merged pull requests and recent history rewrites.
  • Keep untrusted code away from privileged CI. CircuitVerse shows the risk. Fork pull requests there could trigger a workflow that built and published installers. Require maintainer approval before workflows run on fork pull requests, and run outside code in workflows with minimal permissions and no access to secrets.
  • Rotate exposed secrets. If your CI ran a pull request from Eternity0207 or a flagged account, consider any secret available to that job potentially exposed and rotate it, as Open Food Facts did. Check release artifacts and installers for tampering.
  • Block the known infrastructure. Add 95.135.181[.]84 to network blocklists and search proxy and firewall logs for connections to it from developer machines and build runners. StepSecurity notes the operator has changed server addresses several times, so also watch for build-time calls to public Ethereum services.
  • Tighten editor defaults. Make sure developers are not set up to automatically run tasks defined inside a newly opened workspace, and open untrusted projects in restricted mode.
  • Treat recruiter coding tests as untrusted. Warn staff and contractors about lures that ask them to clone and run a project. Use disposable virtual machines for this kind of work, never a workstation with corporate credentials.

For federal contractors working through CMMC, this falls under supply-chain and configuration management. Contractors should know which outside code their build systems run and which credentials that code can reach. Making that inventory now is cheaper than reconstructing it after an incident.

Sources