Malicious code in rollup-runtime-core-polyfills (npm)
The npm package rollup-runtime-core-polyfills contained malicious code that impersonated a legitimate rollup polyfill plugin. On every import/require, it decoded and executed a shell command to install an attacker-controlled package (svgcraft-core) and executed code from it, affecting any build system that consumed this package.
- Disclosed
- Last updated
- Blast radius
- Any build system consuming rollup-runtime-core-polyfills; secondary impact on any system installing svgcraft-core as a result of the malicious payload.
- Ecosystems
- Attack vectors
- Affected entities
- rollup-runtime-core-polyfillsMalicious npm package impersonating rollup-plugin-polyfill-node
The npm package rollup-runtime-core-polyfills was published as a malicious typosquat of the legitimate rollup-plugin-polyfill-node package. The package's repository field pointed to the legitimate project (FredKSchott/rollup-plugin-polyfill-node), but the distributed code in dist/index.js contained a hidden payload.\n\nThe malicious code used base64 encoding to conceal a shell command and module name. On every require() or import() of the plugin, it would decode and execute npm install svgcraft-core --no-save --silent --no-audit --no-fund via child_process.spawn(). After installation, it would dynamically require and execute code from the attacker-controlled svgcraft-core package.\n\nThe use of base64 encoding for both the command and the require target, combined with a try/catch block that silently swallowed errors, was deliberate obfuscation. Any build system that consumed rollup-runtime-core-polyfills would automatically pull and execute whatever malicious code the attacker had published under the svgcraft-core npm name.\n\nThe incident was identified and credited to the OpenSSF's malicious-packages repository.
Indicators of compromise
- Packages
- rollup-runtime-core-polyfills
- svgcraft-core
Remediation
- Remove rollup-runtime-core-polyfills from all package.json files and lock files
- Audit npm install logs and build logs for evidence of svgcraft-core installation
- Uninstall svgcraft-core from any affected systems
- Review any artifacts or binaries built with rollup-runtime-core-polyfills for potential compromise
- Use npm audit to identify any remaining malicious dependencies
- Verify the legitimate rollup-plugin-polyfill-node package is used instead
Sources
- GitHub Advisory GHSA-j877-m36j-5p92 · GitHub Advisory Database
Cite this entry
"Malicious code in rollup-runtime-core-polyfills (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed July 28, 2026; last updated July 28, 2026. https://supplychainattack.org/incident/malicious-code-in-rollup-runtime-core-polyfills-npm-16rm1i
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malicious code in sigchain-js (npm)
Malicious code was injected into the published npm package sigchain-js, executing arbitrary code on installation via DES-decrypted payloads from companion packages thedata and tchain-api. The attack also involved typosquatting axios to version 1.18.1, which does not exist in legitimate release history.
npmCompromised packageDependency confusionTyposquatting - containedcritical
Malicious code in @ai_/autoprefixers (npm)
@ai_/autoprefixers is a typosquat of the legitimate autoprefixer package that executes arbitrary attacker-controlled shell commands on installation. The malicious code fetches encrypted payloads from remote C2 servers and decrypts them using a hardcoded key suffix before execution via child_process.exec.
npmTyposquattingCompromised package - containedcritical
Malicious code in text-line-parser (npm)
The npm package text-line-parser contained malicious code in its postinstall.js that collected system information, environment variables (including CI tokens and cloud credentials), and exfiltrated them to a Burp Collaborator domain. The package advertised itself as a text-parsing utility but shipped only stub functions, consistent with a typosquat/decoy supply-chain attack.
npmCompromised packageTyposquatting - containedcritical
Malicious code in parallely (npm)
The npm package parallely contains malicious code that impersonates the legitimate concurrently package. When invoked, it executes a dropper that downloads and runs platform-specific payloads after anti-analysis checks.
npmCompromised packageTyposquatting