bytecore
Affected
- Versions:
5.3.1
Fixed versions
None listed
Fix
No fixed version is listed.
Advisory
Also known as: GHSA-x73m-hgh7-64q2
Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.
Malicious code in bytecore (npm)
---
_-= 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.
Not rated by the source.
5.3.1None listed
No fixed version is listed.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: OpenSSF Malicious Packages · Apache-2.0