Skip to content
Heist/ feed
Back to feed
Unrated

Malicious code in hardhat-deep (npm)

Type: advisorySources: OSV

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (fde0a4a0ec197ee1aab9acf20ea157268b553fdb5669c545c27d92cbf89fe304) The npm package hardhat-deep@2.0.1 is a trojanised shell. Its tarball copies the pino logger source tree (README, SECURITY.md, index.d.ts, lib/proto.js, lib/transport.js, lib/worker.js, lib/levels.js, lib/multistream.js, etc.) verbatim, while the package name and manifest description target the Hardhat ecosystem. The only novel file is lib/config.js, a single-line 4,499,968-byte obfuscator.io bundle with a 26,234-entry rotated string array, two decoder functions, hex-encoded strings and control-flow flattening. The package's top-level index.js is modified from pino's original to unconditionally `require('./lib/config')`, so any consumer that `require`s or `import`s hardhat-deep executes this opaque payload inside the installer's Node process. The exported middleware is a no-op cover with no logger functionality, so running the obfuscated blob is the only effect of installing or loading the package. The author identity (Robert King , jsonspack.com) is unrelated to either Hardhat or pinojs.

Products
hardhat-deep
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-deep (npm)

core-osv · Original source

Published 8 Oct 2026, 03:43 UTC

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (fde0a4a0ec197ee1aab9acf20ea157268b553fdb5669c545c27d92cbf89fe304) The npm package hardhat-deep@2.0.1 is a trojanised shell. Its tarball copies the pino logger source tree (README, SECURITY.md, index.d.ts, lib/proto.js, lib/transport.js, lib/worker.js, lib/levels.js, lib/multistream.js, etc.) verbatim, while the package name and manifest description target the Hardhat ecosystem. The only novel file is lib/config.js, a single-line 4,499,968-byte obfuscator.io bundle with a 26,234-entry rotated string array, two decoder functions, hex-encoded strings and control-flow flattening. The package's top-level index.js is modified from pino's original to unconditionally `require('./lib/config')`, so any consumer that `require`s or `import`s hardhat-deep executes this opaque payload inside the installer's Node process. The exported middleware is a no-op cover with no logger functionality, so running the obfuscated blob is the only effect of installing or loading the package. The author identity (Robert King , jsonspack.com) is unrelated to either Hardhat or pinojs.

osv:MAL-2026-17659

hardhat-deep

Fixed versions: Not specified

Complete source record
{
  "id": "c5bd72748b7c1275ccd07c3713812de474e42bac23c363491ee6774843672696",
  "url": "https://osv.dev/vulnerability/MAL-2026-17659",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Malicious code in hardhat-deep (npm)",
    "summary": "--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (fde0a4a0ec197ee1aab9acf20ea157268b553fdb5669c545c27d92cbf89fe304) The npm package hardhat-deep@2.0.1 is a trojanised shell. Its tarball copies the pino logger source tree (README, SECURITY.md, index.d.ts, lib/proto.js, lib/transport.js, lib/worker.js, lib/levels.js, lib/multistream.js, etc.) verbatim, while the package name and manifest description target the Hardhat ecosystem. The only novel file is lib/config.js, a single-line 4,499,968-byte obfuscator.io bundle with a 26,234-entry rotated string array, two decoder functions, hex-encoded strings and control-flow flattening. The package's top-level index.js is modified from pino's original to unconditionally `require('./lib/config')`, so any consumer that `require`s or `import`s hardhat-deep executes this opaque payload inside the installer's Node process. The exported middleware is a no-op cover with no logger functionality, so running the obfuscated blob is the only effect of installing or loading the package. The author identity (Robert King , jsonspack.com) is unrelated to either Hardhat or pinojs.",
    "evidence": "osv:MAL-2026-17659",
    "products": [
      {
        "name": {
          "value": "hardhat-deep",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.0.1",
            "evidence": "/affected/0/versions"
          }
        ]
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "MAL-2026-17659",
      "aliases": [
        "MAL-2026-17659"
      ],
      "affected": [
        {
          "package": {
            "name": "hardhat-deep",
            "purl": "pkg:npm/hardhat-deep",
            "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-deep/MAL-2026-17659.json",
            "indicators": {
              "evidence_files": [
                {
                  "path": "index.js",
                  "tlsh": "0421149124d560ce9938dac0f6306115acdbc677260752b3bdfc97c927860080161fba",
                  "sha256": "4e6c4e61a7019ab0affe9c2d20e36701b330ec357be205930355bac1464f9316"
                },
                {
                  "path": "lib/config.js",
                  "tlsh": "61265f889244e03796cf1ac3bf0529ede57aa861e4cca30797d4be5cb9ac40bd4b5dd0",
                  "sha256": "b01c59ae0a76527503799aab109bd701e34f260d192722a8cf12c97a4e6d208c"
                },
                {
                  "path": "package.json",
                  "tlsh": "68017620deb88e2301ed25424c2a0603b6a58c179528fc2933dba12c0f9d5fb41bf22d",
                  "sha256": "01edd4a40b2c3451b1f0d54d673371e6f02d372239ffa53b6741dd3ab5d80f7f"
                }
              ],
              "package_integrity": [
                {
                  "hashes": {
                    "sha1": "3bb404b0ad72c15aa11b1e5d1a3998e73007ae08",
                    "sha512_sri": "sha512-2JPj1GPPn4tLe4QssJhj6F5T8hHqAEpCqvgoHkZEnMUV/pr1bL+ap3aW+wT5HsZNqJ7SjlG4FrZn3HZZpBWS4A=="
                  },
                  "filename": "hardhat-deep-2.0.1.tgz"
                }
              ]
            }
          }
        }
      ],
      "modified": "2026-10-08T04:00:05.143158358Z",
      "provider": "osv",
      "references": [
        "https://www.npmjs.com/package/hardhat-deep/v/2.0.1"
      ],
      "provider_metadata": {
        "malicious-packages-origins": [
          {
            "id": "IN-MAL-2026-021132",
            "sha256": "fde0a4a0ec197ee1aab9acf20ea157268b553fdb5669c545c27d92cbf89fe304",
            "source": "amazon-inspector",
            "versions": [
              "2.0.1"
            ],
            "import_time": "2026-10-08T03:50:30.012677686Z",
            "modified_time": "2026-10-08T03:43:45Z"
          }
        ]
      }
    },
    "related_cves": [],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 98435,
  "published_at": "2026-10-08T03:43:45+00:00"
}