MAL-2026-6688
Malicious code in console-fmt-cli (npm)
Details
Malicious npm package published as part of a coordinated DeFi-themed infostealer campaign. `console-fmt-cli` uses a side-loader technique: it declares `decimal-format-core >=3.0` as a dependency, which contains a dropper that executes at install time via a `postinstall` hook. The dropper fetches a second-stage infostealer from a remote C2 (`logstream-api.online`) that harvests cryptocurrency wallet vaults (MetaMask, Phantom, Solflare, OKX, Coinbase, TrustWallet, Backpack, TronLink), browser cookies and credentials, SSH keys, AWS credentials, `.npmrc` tokens, Docker config, shell history, and password manager databases.
--- _-= Per source details. Do not edit below this line.=-_
## Source: amazon-inspector (62d4aa3c5f7523f4a10d37346a6eaa228940d76f797e13b6d2010385e81e4331) On every call to createLogger (the package's documented entrypoint), logger.js resolves the peer dependency decimal-format-core's private scripts/install-check.cjs path and invokes runRuntimeProjectSync() via setImmediate, wrapped in a try/catch that suppresses all errors. The README describes decimal-format-core as an optional formatting dependency, yet the logger unconditionally reaches into that dependency's internal scripts/ directory and executes a runtime function on ordinary library use. The trigger function is named queueRuntimeProjectSync and the invoked file is named install-check.cjs, both consistent with a cover story that hides script execution from the consumer. This package itself contains no exfiltration or network calls; its role is to act as a loader stub that shifts execution into decimal-format-core, whose install-check.cjs code determines the actual payload behavior.
## Source: ghsa-malware (c0d33f834565128a6d6c1af414b6108ca0a8be8e1c85c489c824999524bc8f77) 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.
Are you affected?
Enter the version of the package you're using.
Affected packages
0 No fixed version published yet for console-fmt-cli (npm). Pin to a known-safe version or switch to an alternative.
References
- https://safedep.io/defi-infostealer-fake-arbitrage-bot-npm/ [REPORT]
- https://www.npmjs.com/package/console-fmt-cli/v/2.1.0 [PACKAGE]
- https://www.npmjs.com/package/console-fmt-cli/v/2.3.0 [PACKAGE]
- https://www.npmjs.com/package/console-fmt-cli/v/2.5.0 [PACKAGE]
- https://www.npmjs.com/package/console-fmt-cli/v/2.0.0 [PACKAGE]
- https://www.npmjs.com/package/console-fmt-cli/v/2.7.0 [PACKAGE]
- https://www.npmjs.com/package/console-fmt-cli/v/2.2.0 [PACKAGE]
- https://www.npmjs.com/package/console-fmt-cli/v/2.9.0 [PACKAGE]
- https://www.npmjs.com/package/console-fmt-cli/v/2.4.0 [PACKAGE]
- https://www.npmjs.com/package/console-fmt-cli/v/2.8.0 [PACKAGE]
- https://www.npmjs.com/package/console-fmt-cli/v/2.6.0 [PACKAGE]
- https://www.npmjs.com/package/console-fmt-cli/v/2.9.1 [PACKAGE]
- https://github.com/advisories/GHSA-p3j8-3227-2w78 [ADVISORY]