Skip to content
Heist/ feed
Back to feed
Unrated

Malicious code in hardhat-option (npm)

Type: advisorySources: OSV

hardhat-option@2.0.1 was published to npm on 2026-10-07 09:12 UTC and removed by npm on 2026-10-07 15:29 UTC. Like hardhat-promised@2.21.0 (published the day before), the name targets the Ethereum development tool hardhat, and the package is a copy of the pino logger (README badges still point to pino) with one file added that pino does not contain: lib/config.js, a 4,499,968-byte obfuscated script. index.js requires ./lib/config on line 6, so the payload runs as soon as the package is required. package.json carries the same fake author as hardhat-promised (Robert King ), no repository, and the added dependency axios. Behavior observed when lib/config.js is loaded in an instrumented sandbox: axios.post of JSON to http://167.88.172.33:8087/api/log containing os.hostname(), os.platform()/release()/type() and os.userInfo().username, with a fixed key ukey=309 (hardhat-promised uses 301), a tag t=3, a timestamp and a SHA-256 'validation' header. The messages posted are 'Failed to spawn autoUploadScript', 'Failed to spawn ldbScript' and 'Failed to spawn socketScript', which name the same three stealer modules as hardhat-promised: automatic file upload, LevelDB (browser extension / wallet storage) reading, and a persistent socket connection to the operator. Trigger: on import (require). Type: trojanized copy of a popular library acting as an information-stealer loader with a hard-coded C2 at 167.88.172.33:8087; second package of the hardhat-promised family. --- _-= Per source detail

Products
hardhat-option
Affected versions
2.0.1
Fixed versions
Not specified
CVEs
Not specified
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 06:03 UTC · Revision 1

Source evidence

Malicious code in hardhat-option (npm)

core-osv · Original source

Published 8 Oct 2026, 03:38 UTC

hardhat-option@2.0.1 was published to npm on 2026-10-07 09:12 UTC and removed by npm on 2026-10-07 15:29 UTC. Like hardhat-promised@2.21.0 (published the day before), the name targets the Ethereum development tool hardhat, and the package is a copy of the pino logger (README badges still point to pino) with one file added that pino does not contain: lib/config.js, a 4,499,968-byte obfuscated script. index.js requires ./lib/config on line 6, so the payload runs as soon as the package is required. package.json carries the same fake author as hardhat-promised (Robert King ), no repository, and the added dependency axios. Behavior observed when lib/config.js is loaded in an instrumented sandbox: axios.post of JSON to http://167.88.172.33:8087/api/log containing os.hostname(), os.platform()/release()/type() and os.userInfo().username, with a fixed key ukey=309 (hardhat-promised uses 301), a tag t=3, a timestamp and a SHA-256 'validation' header. The messages posted are 'Failed to spawn autoUploadScript', 'Failed to spawn ldbScript' and 'Failed to spawn socketScript', which name the same three stealer modules as hardhat-promised: automatic file upload, LevelDB (browser extension / wallet storage) reading, and a persistent socket connection to the operator. Trigger: on import (require). Type: trojanized copy of a popular library acting as an information-stealer loader with a hard-coded C2 at 167.88.172.33:8087; second package of the hardhat-promised family. --- _-= Per source detail

osv:MAL-2026-17660

hardhat-option

Fixed versions: Not specified

Complete source record
{
  "id": "334efe18bdd3c1a25e9e45f5873c4865b5422260059a31f73729a700dd9108a4",
  "url": "https://osv.dev/vulnerability/MAL-2026-17660",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Malicious code in hardhat-option (npm)",
    "summary": "hardhat-option@2.0.1 was published to npm on 2026-10-07 09:12 UTC and removed by npm on 2026-10-07 15:29 UTC. Like hardhat-promised@2.21.0 (published the day before), the name targets the Ethereum development tool hardhat, and the package is a copy of the pino logger (README badges still point to pino) with one file added that pino does not contain: lib/config.js, a 4,499,968-byte obfuscated script. index.js requires ./lib/config on line 6, so the payload runs as soon as the package is required. package.json carries the same fake author as hardhat-promised (Robert King ), no repository, and the added dependency axios. Behavior observed when lib/config.js is loaded in an instrumented sandbox: axios.post of JSON to http://167.88.172.33:8087/api/log containing os.hostname(), os.platform()/release()/type() and os.userInfo().username, with a fixed key ukey=309 (hardhat-promised uses 301), a tag t=3, a timestamp and a SHA-256 'validation' header. The messages posted are 'Failed to spawn autoUploadScript', 'Failed to spawn ldbScript' and 'Failed to spawn socketScript', which name the same three stealer modules as hardhat-promised: automatic file upload, LevelDB (browser extension / wallet storage) reading, and a persistent socket connection to the operator. Trigger: on import (require). Type: trojanized copy of a popular library acting as an information-stealer loader with a hard-coded C2 at 167.88.172.33:8087; second package of the hardhat-promised family. --- _-= Per source detail",
    "evidence": "osv:MAL-2026-17660",
    "products": [
      {
        "name": {
          "value": "hardhat-option",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.0.1",
            "evidence": "/affected/0/versions"
          }
        ]
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "MAL-2026-17660",
      "aliases": [
        "MAL-2026-17660"
      ],
      "affected": [
        {
          "package": {
            "name": "hardhat-option",
            "purl": "pkg:npm/hardhat-option",
            "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-option/MAL-2026-17660.json",
            "indicators": {
              "evidence_files": [
                {
                  "path": "lib/config.js",
                  "tlsh": "61265f889244e03796cf1ac3bf0529ede57aa861e4cca30797d4be5cb9ac40bd4b5dd0",
                  "sha256": "b01c59ae0a76527503799aab109bd701e34f260d192722a8cf12c97a4e6d208c"
                },
                {
                  "path": "package.json",
                  "tlsh": "5e017620deb88e2301ed25825c2a0603b6a18c175528fc2933dba12c0fad5fb41bf22d",
                  "sha256": "1e4d73a4b8f560ba835af847b248c85e0a7ae02253aa160504a5b5009f3cb746"
                }
              ],
              "package_integrity": [
                {
                  "hashes": {
                    "sha1": "1f82b713a392b01bd0b75c52654761c7866cef36",
                    "sha512_sri": "sha512-Xuhq5XHR/fIU8SmY4COyYjBbNHa5AA1QAJGj0gx013RxO919NrboN7DnYJqYGKgiRTeA4QYDg1sjgLA+7is6+A=="
                  },
                  "filename": "hardhat-option-2.0.1.tgz"
                }
              ]
            }
          }
        }
      ],
      "modified": "2026-10-12T05:00:07.973177494Z",
      "provider": "osv",
      "references": [
        "https://www.npmjs.com/package/hardhat-option/v/2.0.1"
      ],
      "provider_metadata": {
        "iocs": {
          "ips": [
            "167.88.172.33"
          ],
          "urls": [
            "http://167.88.172.33:8087/api/log"
          ],
          "files": [
            {
              "note": "obfuscated loader added to the pino copy; posts host identity to the C2 and spawns the stealer modules",
              "paths": [
                "lib/config.js"
              ],
              "source": "PACKAGE_ARCHIVE",
              "digests": {
                "sha256": "b01c59ae0a76527503799aab109bd701e34f260d192722a8cf12c97a4e6d208c"
              }
            },
            {
              "note": "requires ./lib/config on line 6, so the payload runs on import",
              "paths": [
                "index.js"
              ],
              "source": "PACKAGE_ARCHIVE",
              "digests": {
                "sha256": "4e6c4e61a7019ab0affe9c2d20e36701b330ec357be205930355bac1464f9316"
              }
            }
          ]
        },
        "malicious-packages-origins": [
          {
            "id": "IN-MAL-2026-021119",
            "sha256": "2d460f6c739361d793fbc66b2aa32d1d9ab6fe0df4caefe13c590f40d05d5277",
            "source": "amazon-inspector",
            "versions": [
              "2.0.1"
            ],
            "import_time": "2026-10-08T03:50:29.181798954Z",
            "modified_time": "2026-10-08T03:38:47Z"
          }
        ]
      }
    },
    "related_cves": [],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 298600,
  "published_at": "2026-10-08T03:38:47+00:00"
}