Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in crypto-promiser (npm)

0
Critical
Published: 07/08/2026 (07/08/2026, 17:31:26 UTC)
Source: GCVE Database
Product: crypto-promiser

Description

--- _-= 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.

Affected software

npmghsa
crypto-promiser
Affected versions
=1.0.1=1.0.2

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/10/2026, 09:29:37 UTC

Technical Analysis

The crypto-promiser package versions 1.0.1 and 1.0.2 contain malicious code that executes arbitrary JavaScript fetched from an anonymous external paste host. The package's postinstall lifecycle script runs a prepinstall.js script that decodes a base64 URL, fetches JSON data, and pipes a field from the response into a detached Node.js process, executing attacker-controlled code. Additionally, the package's index.js dynamically imports prepinstall.js on require or import, triggering the same malicious fetch-and-execute behavior. This typosquatting package closely mimics the legitimate crypto-promise API to lure victims. The remote payload source is mutable and obfuscated, enabling persistent arbitrary code execution on any machine that installs or uses the package.

Potential Impact

Arbitrary code execution occurs on the installer machine both at install time and at runtime when the package is imported or required. This leads to full compromise of the affected system, including potential unauthorized access to secrets, keys, and other sensitive data stored on the machine. Because the attacker-controlled payload is fetched from a mutable external source, the malicious code can be changed dynamically, increasing the risk and persistence of the compromise. Systems with this package installed should be treated as fully compromised.

Mitigation Recommendations

No official patch or fix is currently available. The package crypto-promiser versions 1.0.1 and 1.0.2 should be immediately removed from all systems. All secrets and cryptographic keys stored on compromised machines must be rotated from a secure, unaffected environment. Due to the full compromise risk, additional forensic analysis and remediation may be necessary to ensure no residual malicious code remains. Avoid installing similarly named packages and verify package authenticity before installation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-7010
Osv Schema Version
1.7.4
Aliases
["GHSA-pgcc-398f-7cv2"]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a50ba2f68715ace4357cfec

Added to database: 07/10/2026, 09:23:59 UTC

Last enriched: 07/10/2026, 09:29:37 UTC

Last updated: 07/30/2026, 05:47:33 UTC

Views: 35

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses