npm · Malicious package advisory
Malwarebytecore
MAL-2026-4503
Malicious code in bytecore (npm)
Details
---
_-= Per source details. Do not edit below this line.=-_
## Source: amazon-inspector (1c1ddd2dea35052822d2dc89f0f46ceae20c772c257e0c97f0024483e9ff31c0)
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.
Compromised versions (1)
- 5.3.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.