npm · Malicious package advisory
Malwarelog-format-thread
MAL-2026-6848
Malicious code in log-format-thread (npm)
Details
---
_-= Per source details. Do not edit below this line.=-_
## Source: amazon-inspector (6e034e855661cc792a14908c613b0d3ae31917a99927ddf0db29b1ae173df0cd)
Package advertises itself as a log formatter but exposes an undocumented `threadContent` option on `createLogger()` that is forwarded to a worker thread which compiles and executes it via `new Function('require', payload)(require)` (src/worker.js lines 5-7, triggered from src/index.js lines 148-151). The eval only runs against a payload the caller explicitly supplies, so installing or requiring the package does not by itself execute attacker-controlled code, and there are no install hooks, no remote fetches, no credential reads, and no outbound exfiltration. However, the feature is undocumented in the README, is shaped like a backdoor primitive rather than logging functionality, and the package also pulls in `axios` and `request` despite the README claiming 'Zero dependencies'. Consumers who pass user-controlled or otherwise untrusted data into `threadContent` would expose their application to arbitrary code execution. Routing to human review so a maintainer can decide whether to publish a public advisory about the undocumented eval surface and the dependency mismatch.
## Source: ghsa-malware (336e8b05b5d99a33aed734a8bc6940554d865ad279346612362782f4cded5ff3)
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 (2)
- 1.0.1
- 1.0.0
Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.