Skip to content
supplychainattack.orgSupply chain attack incident catalog
containedcritical

Malicious code in hardhat-hold (npm)

hardhat-hold is a typosquatting package impersonating hardhat (Ethereum tooling) and pino (logger). It contains a ~4MB obfuscated payload that executes at import time, exposing shell execution and HTTP client primitives for dropper/exfiltration activity.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any developer or system that installed hardhat-hold from npm
Ecosystems
Attack vectors
Affected entities
  • hardhat-holdnpm package

The npm package hardhat-hold is a malicious typosquat variant of the legitimate hardhat Ethereum development tool. The package name is a one-token variant designed to deceive developers, and its README and metadata impersonate the pino logger library, including shields.io badges pointing to pino's repository.\n\nThe package's main entry point (index.js) unconditionally requires a ~4MB obfuscated blob (obfuscator.io-style with a string array of ~23,981 entries and rotating decoder). This payload executes at import time via a top-level IIFE and contains readable identifiers for execSync (child_process) and axios (HTTP client)—the canonical primitives used by dropper and exfiltration stagers.\n\nThe wrapper index.js mimics the pino logger API surface but never actually uses the config export; its sole purpose is to force the obfuscated payload to load on require(). The combination of name/README/description mismatch with an obfuscated import-time payload carrying shell-execution and HTTP capabilities matches the canonical typosquat-dropper attack pattern.\n\nThe malicious package was identified by the OpenSSF malicious-packages project (MAL-2026-14246).

Indicators of compromise

Packages
  • hardhat-hold

Remediation

  • Immediately uninstall hardhat-hold from all systems and projects
  • Audit npm install logs and dependency trees to identify all systems that may have installed this package
  • Assume any system that installed hardhat-hold has been compromised; review process execution logs, network connections, and file modifications from the installation time onward
  • Rotate credentials and API keys on any affected systems
  • Use npm audit to check for other malicious packages in your dependency tree
  • Verify the legitimacy of hardhat and pino packages by checking their official repositories and maintainers

Sources

  1. GitHub Advisory GHSA-rc6j-6f8f-vvwr · GitHub Advisory Database

Cite this entry

"Malicious code in hardhat-hold (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 19, 2026; last updated August 19, 2026. https://supplychainattack.org/incident/malicious-code-in-hardhat-hold-npm-15e6lq

Suggest a correction

Found an error or have a newer source? Corrections to factual errors take priority over new entries.

  1. resolvedcritical

    Malicious code in create-coin (npm)

    create-coin@20.1.1 on npm contained malicious postinstall code that collected sensitive environment variables, credentials, and host reconnaissance data. The package impersonated an esbuild platform build and exfiltrated data to a hardcoded endpoint.

    npmCompromised packageTyposquatting
  2. containedcritical

    Malicious code in chai-as-testkit (npm)

    The npm package chai-as-testkit is a typosquat/impersonation attack delivering obfuscated malicious code that executes on import. The package falsely claims to be a vulnerability management tool but ships pino library files under a different author, with a synthetic stub that loads a 4MB+ obfuscated bundle containing attacker-controlled code.

    npmTyposquattingCompromised package
  3. resolvedcritical

    Malicious code in @next-fonts/font (npm)

    @next-fonts/font is a typosquat package on npm that executes arbitrary attacker-controlled code via a blockchain-mediated C2 channel when its Inter() function is called. The malicious payload is base64-encoded and executed through Node.js spawn or eval, with no legitimate font functionality.

    npmTyposquattingCompromised package
  4. resolvedcritical

    Malicious code in chai-as-soul (npm)

    chai-as-soul@2.3.5 is a typosquat of the pino logging library containing malicious code that exfiltrates environment variables (including AWS/GCP/CI tokens) and executes arbitrary remote code on installation.

    npmTyposquattingCompromised package