MAL-2026-4791
Malicious code in react-cleaner (npm)
Details
--- _-= Per source details. Do not edit below this line.=-_
## Source: amazon-inspector (11c3d7a072dc204b4c150fae46302a31dafd46c85518d4ba7128fc7d36bf6a53) react-cleaner@1.0.4 is a pino-logger impersonator (package main is pino.js, homepage https://getpino.io, module layout mirrors pino's lib/ tree) that, on require, executes attacker-controlled remote code with the installer's environment in scope. lib/writer.js calls axios.get('https://www.jsonkeeper.com/b/MYUKZ') and passes the response body directly to eval(). jsonkeeper.com is a mutable paste-style host, so the author can rotate the executed payload at any time without republishing. Before the fetch, writer.js assembles a data object containing the entirety of process.env, os.hostname(), os.userInfo().username, os.platform(), and the host's non-internal MAC addresses; this object is in scope when the remote payload runs, giving the attacker direct access to AWS_*, GITHUB_TOKEN, NPM_TOKEN, and any other secrets present in the installer's environment. A second remote-code channel is hex-obfuscated alongside the plaintext one: a hl array decodes to 'axios','get','https://www.jsonkeeper.com/b/HY6M6','then', confirming deliberate concealment of a backup eval source. The combination — pino impersonation as cover, require-time fetch-and-eval from a mutable anonymous host, bulk env scrape staged in eval scope, hex-obfuscated secondary URL — is an unambiguous credential-harvesting RCE.
Are you affected?
Enter the version of the package you're using.
Affected packages
No fixed version published yet for react-cleaner (npm). Pin to a known-safe version or switch to an alternative.