npm · Malicious package advisory
Malwarerandomlogs
MAL-2026-4657
Malicious code in randomlogs (npm)
Details
---
_-= Per source details. Do not edit below this line.=-_
## Source: amazon-inspector (c085eee0876092131c3f909facc237674fcfb1e02bafbafcb34230c87b3a3819)
The package's main module (index.js lines 6-10) exports a function `mal` that opens a TCP socket to 223.229.156.10:5513 and pipes a spawned shell (`/bin/sh` or `cmd.exe`) stdin/stdout/stderr through that socket — a textbook reverse shell granting interactive remote control of the calling host to the operator of that IP. The package's own `package.json` description openly states the package contains malware ("this has a malware and it is only for testing purpose") and presents under a benign-sounding name (`randomlogs`, advertised as a random-string utility). Any consumer who requires and invokes the exported function hands full shell access on their machine to the hardcoded remote endpoint.
## Source: ghsa-malware (8eca8cfc258b23cf2a6ee74a7af0c73c30453a1b7427083bbcaa6023fa87d06d)
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 (3)
- 1.2.2
- 1.2.4
- 1.2.3
Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.