Malicious code in decimal-format-core (npm)
Historical advisory saved 24 Oct 2026 13:17:17 UTC. The publisher may have updated it since then. Latest advisory.
osv · MAL-2026-6689
PublishedMalicious npm package published as part of a coordinated DeFi-themed infostealer campaign. `decimal-format-core` uses a dropper technique: a `postinstall` hook executes `scripts/install-check.cjs` at install time, which fetches a second-stage infostealer payload from the C2 domain `logstream-api.online`. The infostealer harvests cryptocurrency wallet vaults (MetaMask, Phantom, Solflare, OKX, Coinbase, TrustWallet, Backpack, TronLink), Chrome/Firefox/Brave cookies and credentials, SSH keys, AWS credentials, `.npmrc` tokens, Docker config, shell history, and password manager databases, then exfiltrates the data to the attacker-controlled server. --- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (07d73eb9b3d87a4d1a65dcb4e485fca74b01a1473a305a52345a5c7be95b0631) Package advertises itself as a numeric/text formatting utility but ships an install-time and import-time dropper. The `postinstall` script runs `scripts/install-check.cjs`, which reads `package.json.homepage` (`https://logstream-api.online/config/dfc-sync.json`) as a remote configuration channel, fetches a `.tgz` bundle URL from that JSON, downloads and extracts the tarball into a `.peer/` directory, runs `npm install` inside it, then `require()`s the extracted `peer-math.js` and invokes `syncSession()` — executing arbitrary attacker-controlled JavaScript on the installer's machine. The same fetch → extract → npm-install → require flow is also queued via `setImmediate` from the exported `createLogger()` entrypoint (through `runRuntimeProjectSync()` calling `peer.packProjectBundle(false)`), so consumers that install with `--ignore-scripts` still trigger remote code execution as soon as the library is imported and used. Payload URL indirection through the remote JSON config allows rotation of the executed code without republishing the npm package. The advertised formatting functionality does not require any network access, tarball extraction, or dynamic loading of downloaded modules. ## Source: ghsa-malware (7418b3fb88f3b25773cddacaa807900d6e5aab486723f17a4bc6306f1aa247fd) 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.
- Source published
- 30 Jun 2026 00:00:00 UTC
- Source modified
- 13 Jul 2026 09:16:51 UTC
- Saved here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.