Skip to main content

Malicious code in hardhat-hold (npm)

0
High
Published: 08/19/2026 (08/19/2026, 03:54:07 UTC)
Source: GCVE Database
Product: hardhat-hold

Description

The npm package hardhat-hold contains malicious code embedded in an obfuscated payload that executes immediately upon import. This payload includes capabilities to run shell commands and make outbound HTTP requests, typical of dropper malware used for code execution and data exfiltration. The package is a typosquatting attempt targeting the legitimate Ethereum tooling package hardhat, with misleading README and metadata to impersonate the pino logger. Two specific versions, 2.0.1 and 2.21.0, are affected. No official patch or remediation guidance is provided in the available data.

Affected software

npmghsa
hardhat-hold
Affected versions
=2.0.1=2.21.0

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: 08/19/2026, 14:27:56 UTC

Technical Analysis

The hardhat-hold npm package is a malicious typosquatting package that impersonates legitimate software to trick users into installation. Its main entry point requires an obfuscated ~4MB payload that runs immediately, containing code that uses child_process.execSync and axios to execute shell commands and perform HTTP requests. The package metadata and README are crafted to mimic unrelated legitimate projects, increasing the likelihood of accidental use. The malicious payload's presence at import time means any use of the package triggers the malicious behavior. The affected versions are exactly 2.0.1 and 2.21.0.

Potential Impact

Users who install and import hardhat-hold versions 2.0.1 or 2.21.0 risk executing arbitrary shell commands and outbound network requests controlled by an attacker. This can lead to system compromise, data exfiltration, or further malware deployment. The package's typosquatting nature increases the risk of accidental installation by developers intending to use the legitimate hardhat package or pino logger.

Mitigation Recommendations

No official patch or remediation guidance is provided. Users should avoid installing or using the hardhat-hold package, especially versions 2.0.1 and 2.21.0. Verify package names carefully before installation to avoid typosquatting traps. Consider using package integrity verification tools and monitoring for suspicious dependencies in projects.

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

Threat ID: 6a85b4c0acd9273b49252439

Added to database: 08/19/2026, 13:50:56 UTC

Last enriched: 08/19/2026, 14:27:56 UTC

Last updated: 10/04/2026, 08:49:24 UTC

Views: 48

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