GitHub and npm ecosystem · Source code repositories and JavaScript build tooling · POLINRIDER
PolinRider malware hides in thousands of GitHub projects and runs when a developer builds or opens them
PolinRider is malware, linked by researchers to North Korea, that spreads through developers' own GitHub projects rather than through a flaw in one product. Once it has stolen a developer's GitHub access, it rewrites their commits to hide a loader in ordinary project files such as postcss.config.js, jest.config.js, next.config.ts or vite.config.ts. The loader runs when someone builds the project, runs its tests, or just opens the folder in VS Code, then steals saved passwords and keys and pushes itself into more repositories. Apiiro counted 7,609 affected repositories, The Hacker News reports. There is no vendor advisory or patch: this is a campaign, not a single bug.
- Affected
- Anyone who clones, builds or opens code from GitHub that they have not checked, especially web projects built with Node.js tooling (Next.js, Vite, PostCSS, Jest). SafeDep found the loader in source repositories, not in packages on npm or PyPI, so dependency scanners will not find it; The Hacker News lists a small number of hijacked npm packages used in related waves. Real, long-standing developer accounts are affected, not just throwaway ones.
- What to do
- In VS Code, keep Restricted Mode on for code you have not reviewed and set automatic tasks (Allow Automatic Tasks) to off. On your repositories, block force pushes, require pull requests, and require approval before workflows from outside contributors run. Search your projects for the signs researchers describe: config files that are far larger than they should be or have code after a very long run of blank space, build scripts in package.json that start with "node api.js &&", unexpected font files such as fa-solid-400.woff2, and a .vscode/tasks.json task set to run on folder open. If a machine ran an affected project, treat it as compromised: clean it first, then change GitHub, npm, SSH, hosting and cloud credentials from a clean machine, and check every repository that account can write to for force pushes and unverified commits.General information summarised from the vendor's advisory at the time of writing, not professional advice. Check the vendor's current advisory before acting.
- Why it’s here
- An active supply chain attack aimed squarely at the web development tools studios and their clients use, and widely covered.
