Skip to content
Heist/ feed
Unrated

Malicious code in hardhat-zet (npm)

Type: advisorySource: OSV1 source record

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (37cd33c0908189c0085fba153be1c42776411968aa5ad652dd7ffdef88b318bc) hardhat-zet@2.0.1 is published under a name that impersonates the Hardhat Ethereum tooling ecosystem, but its README, type definitions and docs/ tree are copied verbatim from the unrelated `pino` logger project (badges and links point at npmjs.com/package/pino and github.com/pinojs/pino). The exported `middleware` in index.js is a no-op Express middleware and matches neither the `hardhat-zet` name nor the pino README. The package's declared main (index.js) top-level-requires./lib/config, which is not a configuration file but a 4,498,609-byte obfuscator.io-style bundle: a 26,113-entry rotated string array behind two runtime decoders (functions v and F), hex-encoded identifiers, and control-flow flattening. All strings and destination URLs are hidden behind the decoders, so this code runs automatically on any `require('hardhat-zet')` and its behavior is not observable without deobfuscation. Publisher metadata (author 'Robert King ', bugs URL https://jsonspack.com/issues) ties to neither the Hardhat nor the pino identity. The combination — ecosystem-typosquat name targeting crypto/Hardhat developers, cover-story README lifted from an unrelated popular package, no-op public API, and a multi-megabyte obfuscated payload auto-executed on import — is the shape of a supply-chain stealer aimed at Ethereum developers. ## Source: ghsa-

Announced Group revision 1
Original source ↗

MAL-2026-17234

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:MAL-2026-17234

hardhat-zet

Source reference: /affected/0/package/name

Affected versions
2.0.1

Source reference: /affected/0/versions

Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "ranges": [
      {
        "type": "SEMVER",
        "events": [
          {
            "introduced": "0"
          }
        ]
      }
    ],
    "package": {
      "name": "hardhat-zet",
      "purl": "pkg:npm/hardhat-zet",
      "ecosystem": "npm"
    },
    "versions": [
      "2.0.1"
    ],
    "database_specific": {
      "cwes": [
        {
          "name": "Embedded Malicious Code",
          "cweId": "CWE-506",
          "description": "The product contains code that appears to be malicious in nature."
        },
        {
          "name": "Embedded Malicious Code",
          "cweId": "CWE-506",
          "description": "The product contains code that appears to be malicious in nature."
        }
      ],
      "source": "https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/hardhat-zet/MAL-2026-17234.json",
      "indicators": {
        "evidence_files": [
          {
            "path": "lib/config.js",
            "tlsh": "b32670ca1681f36397dd2713bf19a9e8e02e9ce19888f247d15e7d4d69ec11bc1a0de0",
            "sha256": "6d06757f9ab4a23c5f09b416308cff0322ada95f0484ec4c76386cfb6898a17d"
          },
          {
            "path": "README.md",
            "tlsh": "0a41a56787e47fbe5b6301b2d1c275a9ff1fd31c3f6a60b9d99c812d13185a2813220a",
            "sha256": "c06dbdc49dd2b00aa4a2e42b8096e2b00ade911b28e5f9c2ddc108fe64bd0cb8"
          },
          {
            "path": "package.json",
            "tlsh": "ca017620deb88e2301ed29424c2a0643baa58c175528fc2933dba12c0f9d5fb41bf22d",
            "sha256": "1ce0376fd8b945eda3c1fb466d3acc39347cb6506f825365f8d3b7262bb923d5"
          }
        ],
        "package_integrity": [
          {
            "hashes": {
              "sha1": "6742e955c2505a00854a0e3a2e5d1ed507b0bbb5",
              "sha512_sri": "sha512-lSUUCgdQXRx28zGPhrJNpZ/N8vuLFdaIGTWaBcpBnaQeMM86BScDFJD3zdSqexHxkXsu+HIvloKWsMMIbPkIKA=="
            },
            "filename": "hardhat-zet-2.0.1.tgz"
          }
        ]
      }
    }
  }
]

Publisher severity

No explicit severity was provided.

Event
#71353 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement