Skip to content
Heist/ feed
Back to feed
Unrated

Malicious code in hardhat-pack (npm)

Type: advisorySources: OSV

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (b39859996d5d333a776d3ed42a203450ea588adefd91ba46a25a0bef0b17cf02) The package is published as `hardhat-pack`, a name shape that resembles the Hardhat Ethereum tooling ecosystem, but its README, LICENSE, TypeScript declarations and library source are copied verbatim from the unrelated `pino` logger. The only material divergence from upstream pino is that `index.js` adds `const config = require('./lib/config');` at the top level, and `lib/config.js` is a single-line 4.4MB obfuscator.io payload: an IIFE with a ~26,000-entry hex-escaped string array and a rotating decoder. Nothing in the shipped source references `config` for a legitimate purpose, and the package carries no native build, no vendored SDK, and no other justification for a multi-megabyte opaque blob. The package also declares `axios` as a runtime dependency, consistent with network exfiltration or remote fetch from inside the decoded payload. Any process that imports `hardhat-pack` hands the opaque payload to the JavaScript engine on first require.

Products
hardhat-pack
Affected versions
2.0.1
Fixed versions
Not specified
CVEs
Not specified
Confirmed fixed CVEs
Not specified
Updated in this feed
28 Oct 2026, 08:58 UTC · Revision 1

Source evidence

Malicious code in hardhat-pack (npm)

core-osv · Original source

Published 8 Oct 2026, 03:43 UTC

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (b39859996d5d333a776d3ed42a203450ea588adefd91ba46a25a0bef0b17cf02) The package is published as `hardhat-pack`, a name shape that resembles the Hardhat Ethereum tooling ecosystem, but its README, LICENSE, TypeScript declarations and library source are copied verbatim from the unrelated `pino` logger. The only material divergence from upstream pino is that `index.js` adds `const config = require('./lib/config');` at the top level, and `lib/config.js` is a single-line 4.4MB obfuscator.io payload: an IIFE with a ~26,000-entry hex-escaped string array and a rotating decoder. Nothing in the shipped source references `config` for a legitimate purpose, and the package carries no native build, no vendored SDK, and no other justification for a multi-megabyte opaque blob. The package also declares `axios` as a runtime dependency, consistent with network exfiltration or remote fetch from inside the decoded payload. Any process that imports `hardhat-pack` hands the opaque payload to the JavaScript engine on first require.

osv:MAL-2026-17661

hardhat-pack

Fixed versions: Not specified

Complete source record
{
  "id": "fb34f2e9b5ab277d929f6c1418d458591d97f6c9c416a08f8879df0caf65d761",
  "url": "https://osv.dev/vulnerability/MAL-2026-17661",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Malicious code in hardhat-pack (npm)",
    "summary": "--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (b39859996d5d333a776d3ed42a203450ea588adefd91ba46a25a0bef0b17cf02) The package is published as `hardhat-pack`, a name shape that resembles the Hardhat Ethereum tooling ecosystem, but its README, LICENSE, TypeScript declarations and library source are copied verbatim from the unrelated `pino` logger. The only material divergence from upstream pino is that `index.js` adds `const config = require('./lib/config');` at the top level, and `lib/config.js` is a single-line 4.4MB obfuscator.io payload: an IIFE with a ~26,000-entry hex-escaped string array and a rotating decoder. Nothing in the shipped source references `config` for a legitimate purpose, and the package carries no native build, no vendored SDK, and no other justification for a multi-megabyte opaque blob. The package also declares `axios` as a runtime dependency, consistent with network exfiltration or remote fetch from inside the decoded payload. Any process that imports `hardhat-pack` hands the opaque payload to the JavaScript engine on first require.",
    "evidence": "osv:MAL-2026-17661",
    "products": [
      {
        "name": {
          "value": "hardhat-pack",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.0.1",
            "evidence": "/affected/0/versions"
          }
        ]
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "MAL-2026-17661",
      "aliases": [
        "MAL-2026-17661"
      ],
      "affected": [
        {
          "package": {
            "name": "hardhat-pack",
            "purl": "pkg:npm/hardhat-pack",
            "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."
              }
            ],
            "source": "https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/hardhat-pack/MAL-2026-17661.json",
            "indicators": {
              "evidence_files": [
                {
                  "path": "lib/config.js",
                  "tlsh": "61265f889244e03796cf1ac3bf0529ede57aa861e4cca30797d4be5cb9ac40bd4b5dd0",
                  "sha256": "b01c59ae0a76527503799aab109bd701e34f260d192722a8cf12c97a4e6d208c"
                },
                {
                  "path": "package.json",
                  "tlsh": "c5017620deb88e2305ed25424c2a0603b6a58c175528fc2933dba12c4fad5ff41bf22d",
                  "sha256": "947d477618759a0bcd5a4426c5e91751f1bd3d5c5363326cde99b35009a88248"
                }
              ],
              "package_integrity": [
                {
                  "hashes": {
                    "sha1": "9d0bbc030f64f09a98e4c425f5f248689e8eb217",
                    "sha512_sri": "sha512-jnJmr5Rg99If4NpjXqZ0+ZBO34HdD+8lpneBnmNLZUZgvoN4POqjOgkVuW5acnUofdyeDQIJrarNMYuIEpMyHA=="
                  },
                  "filename": "hardhat-pack-2.0.1.tgz"
                }
              ]
            }
          }
        }
      ],
      "modified": "2026-10-08T04:00:04.223122265Z",
      "provider": "osv",
      "references": [
        "https://www.npmjs.com/package/hardhat-pack/v/2.0.1"
      ],
      "provider_metadata": {
        "malicious-packages-origins": [
          {
            "id": "IN-MAL-2026-021133",
            "sha256": "b39859996d5d333a776d3ed42a203450ea588adefd91ba46a25a0bef0b17cf02",
            "source": "amazon-inspector",
            "versions": [
              "2.0.1"
            ],
            "import_time": "2026-10-08T03:50:30.086107934Z",
            "modified_time": "2026-10-08T03:43:57Z"
          }
        ]
      }
    },
    "related_cves": [],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 98424,
  "published_at": "2026-10-08T03:43:57+00:00"
}