Malicious code in mini-hardhat (npm)
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.
AI Analysis
Technical Summary
[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.
Malicious code in mini-hardhat (npm)
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
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
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.