VYPR

npm · Malicious package advisory

Malware

babel-polyfill-plugin-corejs2

GHSA-p4wr-4hqv-rrvr

Malicious code in babel-polyfill-plugin-corejs2 (npm)

Details

**Severity:** Critical

**Affected versions:** `= 1.0.1`

## Source: amazon-inspector (13878d994b01607c379e26646449b7cca95099f9b2eb5be2e1f8e19aeea32eb3)
The package advertises itself as a Babel core-js 2 polyfill plugin, but the shipped lib/index.js contains unrelated web3-core-subscriptions boilerplate followed by a Function() invocation whose body is ~110KB of obfuscated JavaScript (random identifiers, numeric offset arrays, TEA-like mixing routine, unicode-escape string literals). The Function() call executes whenever a consumer require()s the package, running the opaque payload at import time. The declared purpose does not match the shipped code, and the obfuscation is confined to the appended payload rather than being a general minification artifact.

---

Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/72e5d8219b286d7332c4ad2364b87986138cf34c/osv/malicious/npm/babel-polyfill-plugin-corejs2/MAL-2026-14426.json))

**References:**
- https://github.com/ossf/malicious-packages/blob/72e5d8219b286d7332c4ad2364b87986138cf34c/osv/malicious/npm/babel-polyfill-plugin-corejs2/MAL-2026-14426.json
- https://www.npmjs.com/package/babel-polyfill-plugin-corejs2/v/1.0.1
- https://github.com/advisories/GHSA-p4wr-4hqv-rrvr

Compromised versions (1)

  • = 1.0.1

Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.