Skip to main content

Malicious code in mini-hardhat (npm)

0
Critical
Published: 09/28/2026 (09/28/2026, 22:06:31 UTC)
Source: GCVE Database
Product: mini-hardhat

Description

The npm package mini-hardhat version 1.1.4 contains malicious code that masquerades as a JSON logger but actually spawns a detached child process. This child process fetches and executes remote code from an obfuscated URL, enabling arbitrary code execution within the user's Node.js environment. The malicious behavior is engineered to persist beyond the parent process, making it a remote code execution dropper.

Affected software

npmghsa
mini-hardhat
Affected versions
=1.1.4

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: 09/29/2026, 04:47:23 UTC

Technical Analysis

[email protected] claims to be a pino-like JSON logger but exports a middleware factory that, when instantiated, launches a detached child process running lib/caller.js. This script base64-decodes a hardcoded URL hidden under decoy environment variable keys and sends a POST request to that URL. The response body is passed directly to a new Function constructor with require access, allowing the remote endpoint to execute arbitrary code inside the consumer's Node.js process. The fetch is retried up to five times, and the delivery mechanism is designed to survive the parent process termination, indicating intentional remote code execution deployment.

Potential Impact

This vulnerability allows an attacker controlling the remote endpoint to execute arbitrary code with full require access inside the Node.js process of any user who installs and runs [email protected]. This can lead to full system compromise, data theft, or further malicious activity on the affected system.

Mitigation Recommendations

No official patch or remediation is currently documented. Users should immediately stop using [email protected] and remove it from their environments. Avoid installing or running this package until a trusted fix or alternative is available. Monitor for any updates from the package maintainer or npm advisories for remediation guidance.

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-17236
Osv Schema Version
1.7.4
Ecosystems
["npm"]

Threat ID: 6abb4187f7a7c54106cc2f8a

Added to database: 09/29/2026, 04:41:43 UTC

Last enriched: 09/29/2026, 04:47:23 UTC

Last updated: 09/29/2026, 18:01:01 UTC

Views: 4

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