OpenSSF/OSV advisory MAL-2026-4503 confirms this npm version as malicious. The package masquerades as a pino-like logging middleware (README is copied from pino, exports a `pino` property, mimics pino's option shape) but the middleware factory in index.js spawns a detached `node lib/caller.js` child process when the exported function is invoked. lib/caller.js obfuscates a hardcoded C2 URL by shadowing the real `process` global with a local object whose `env` holds base64-encoded strings;...
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in bytecore (npm)
Details
The package masquerades as a pino-like logging middleware (README is copied from pino, exports a `pino` property, mimics pino's option shape) but the middleware factory in index.js spawns a detached `node lib/caller.js` child process when the exported function is invoked. lib/caller.js obfuscates a hardcoded C2 URL by shadowing the real `process` global with a local object whose `env` holds base64-encoded strings; decoding `DEV_API_KEY` yields `https://jsonkeeper.com/b/BADC6`. The script GETs that anonymous, mutable paste host with axios (retried 5 times) and passes the response body to `new Function.constructor("require", s)(require)`, executing attacker-controlled JavaScript with full Node privileges and direct access to `require`. Any application that installs bytecore and mounts the middleware (`app.use(require('bytecore')())`) runs whatever code the paste currently serves. The combination of (a) mutable anonymous paste host as code source, (b) `require`-passing eval of fetched bytes, (c) base64 + process-shadowing obfuscation of the C2, and (d) impersonation of a popular logger to lure installers is an unambiguous remote-code-execution backdoor.
## Source: ghsa-malware (50cd544442497b8b42cd0b27eef33c15e4d0ff4a14c490183664f8cd0a795ef2) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
Decision reason
OpenSSF Malicious Packages via OSV confirms bytecore@5.3.1 as malicious (MAL-2026-4503): Malicious code in bytecore (npm)