Malicious code in crypto-promiser (npm)
Historical advisory saved 24 Oct 2026 13:17:17 UTC. The publisher may have updated it since then. Latest advisory.
osv · MAL-2026-7010
Published--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (25594e7865a7525aebefd2f1fcc8060f144bf202b1986875e1cfd95564f66e88) [email protected] is a typosquat of the legitimate crypto-promise package that ships a dropper in its lifecycle scripts. The declared postinstall runs prepinstall.js, which decodes a base64-hidden URL (aHR0cHM6Ly9qc29ua2VlcGVyLmNvbS9iL1dEVDFI -> https://jsonkeeper.com/b/WDT1H) via atob, fetches JSON from that anonymous paste host with axios, and pipes the `.cache` field of the response into a detached `node` child process over stdin, executing attacker-controlled JavaScript on npm install. index.js also contains a top-level IIFE that dynamically imports./prepinstall.js, causing the same fetch-and-exec to fire when the package is require()d or imported. The package name is a single-character edit of crypto-promise and mirrors its API surface (hash, hmac, cipher, pbkdf2) as a lure. The remote payload host is anonymous and mutable, the destination is obfuscated behind base64, and executed bytes come from a non-registry third-party paste — arbitrary code execution on the installer machine at install time and at require time. ## Source: ghsa-malware (e30fe05ab2f65365185bab693328d0249c8a6dd2366359ffb1e7184d7d5a61e9) 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
- 8 Jul 2026 17:31:26 UTC
- Source modified
- 10 Jul 2026 03:31:47 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.