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.
AI Analysis
Technical Summary
The 'bytecore' npm package version 5.3.1 impersonates a legitimate logging middleware but contains a backdoor that executes attacker-controlled code. The middleware spawns a detached child process running an obfuscated script that fetches JavaScript from a mutable anonymous paste host. This code is executed with full Node.js privileges via a dynamic Function constructor that receives 'require', enabling arbitrary code execution and full system compromise. The package uses obfuscation techniques including process global shadowing and base64-encoded command-and-control URLs to evade detection. This results in a remote code execution vulnerability that compromises any system running the package.
Potential Impact
Any application that installs and uses [email protected] and mounts its middleware is subject to remote code execution by attacker-controlled code fetched at runtime. This grants attackers full control over the affected system, including access to all files, environment variables, and the ability to execute arbitrary commands. Systems with this package installed should be considered fully compromised. Secrets and keys stored on the system are at risk and must be rotated immediately. Removing the package alone may not remove all malicious artifacts or backdoors installed by the attacker.
Mitigation Recommendations
No official patch or fix is available for this malicious package. The recommended mitigation is to immediately remove bytecore version 5.3.1 from all systems. Treat any system with this package installed as fully compromised. Rotate all secrets, credentials, and keys from a separate, trusted environment. Conduct a thorough incident response to identify and remediate any additional persistence mechanisms or malware installed as a result of this compromise.
Malicious code in bytecore (npm)
Description
--- _-= 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.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The 'bytecore' npm package version 5.3.1 impersonates a legitimate logging middleware but contains a backdoor that executes attacker-controlled code. The middleware spawns a detached child process running an obfuscated script that fetches JavaScript from a mutable anonymous paste host. This code is executed with full Node.js privileges via a dynamic Function constructor that receives 'require', enabling arbitrary code execution and full system compromise. The package uses obfuscation techniques including process global shadowing and base64-encoded command-and-control URLs to evade detection. This results in a remote code execution vulnerability that compromises any system running the package.
Potential Impact
Any application that installs and uses [email protected] and mounts its middleware is subject to remote code execution by attacker-controlled code fetched at runtime. This grants attackers full control over the affected system, including access to all files, environment variables, and the ability to execute arbitrary commands. Systems with this package installed should be considered fully compromised. Secrets and keys stored on the system are at risk and must be rotated immediately. Removing the package alone may not remove all malicious artifacts or backdoors installed by the attacker.
Mitigation Recommendations
No official patch or fix is available for this malicious package. The recommended mitigation is to immediately remove bytecore version 5.3.1 from all systems. Treat any system with this package installed as fully compromised. Rotate all secrets, credentials, and keys from a separate, trusted environment. Conduct a thorough incident response to identify and remediate any additional persistence mechanisms or malware installed as a result of this compromise.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-4503
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-x73m-hgh7-64q2"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a4c342c27e9c797195fa595
Added to database: 07/06/2026, 23:03:08 UTC
Last enriched: 07/06/2026, 23:24:12 UTC
Last updated: 07/18/2026, 17:27:21 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.