Skip to content
Heist/ feed
Back to feed
Unrated

Malicious code in hardhat-promised (npm)

Type: advisorySources: OSV

hardhat-promised@2.21.0 was published to npm on 2026-10-06 13:59 UTC by user ryan.danial915 (account's only package, created the same day). The name targets the Ethereum development tool hardhat. The package is a verbatim copy of the pino logger (README, docs, lib/*.js, SECURITY.md; the README badges still point to pino) with one file added that pino does not contain: lib/config.js, a single-line 4,373,384-byte obfuscated script (javascript-obfuscator style, hex-escaped string table, control-flow flattening). index.js requires ./lib/config on line 6, so the payload runs as soon as the package is required; the exported 'middleware' is a no-op. The dependency axios, which pino does not use, was added for the payload. package.json carries a fake author (Robert King ) and no repository. Behavior observed when lib/config.js is loaded in an instrumented sandbox: (1) child_process.spawn of a detached node process (node --max-old-space-size=4096 --no-warnings -, script fed over stdin, stdout and stderr ignored, windowsHide: true, detached: true), i.e. a hidden background process that outlives the parent; (2) code construction through the Function constructor; (3) 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=301, a tag t=3, a timestamp and a SHA-256 'validation' header. The messages posted are 'Starting client', 'Spawning autoUploadScript', 'Spawning ldbScript', 'Spawn

Products
hardhat-promised
Affected versions
2.21.0
Fixed versions
Not specified
CVEs
Not specified
Confirmed fixed CVEs
Not specified
Updated in this feed
28 Oct 2026, 10:33 UTC · Revision 1

Source evidence

Malicious code in hardhat-promised (npm)

core-osv · Original source

Published 8 Oct 2026, 03:44 UTC

hardhat-promised@2.21.0 was published to npm on 2026-10-06 13:59 UTC by user ryan.danial915 (account's only package, created the same day). The name targets the Ethereum development tool hardhat. The package is a verbatim copy of the pino logger (README, docs, lib/*.js, SECURITY.md; the README badges still point to pino) with one file added that pino does not contain: lib/config.js, a single-line 4,373,384-byte obfuscated script (javascript-obfuscator style, hex-escaped string table, control-flow flattening). index.js requires ./lib/config on line 6, so the payload runs as soon as the package is required; the exported 'middleware' is a no-op. The dependency axios, which pino does not use, was added for the payload. package.json carries a fake author (Robert King ) and no repository. Behavior observed when lib/config.js is loaded in an instrumented sandbox: (1) child_process.spawn of a detached node process (node --max-old-space-size=4096 --no-warnings -, script fed over stdin, stdout and stderr ignored, windowsHide: true, detached: true), i.e. a hidden background process that outlives the parent; (2) code construction through the Function constructor; (3) 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=301, a tag t=3, a timestamp and a SHA-256 'validation' header. The messages posted are 'Starting client', 'Spawning autoUploadScript', 'Spawning ldbScript', 'Spawn

osv:MAL-2026-17662

hardhat-promised

Fixed versions: Not specified

Complete source record
{
  "id": "d0781083c39798a05be131f96d862cffb03a94128857023d28e87e63104f781c",
  "url": "https://osv.dev/vulnerability/MAL-2026-17662",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Malicious code in hardhat-promised (npm)",
    "summary": "hardhat-promised@2.21.0 was published to npm on 2026-10-06 13:59 UTC by user ryan.danial915 (account's only package, created the same day). The name targets the Ethereum development tool hardhat. The package is a verbatim copy of the pino logger (README, docs, lib/*.js, SECURITY.md; the README badges still point to pino) with one file added that pino does not contain: lib/config.js, a single-line 4,373,384-byte obfuscated script (javascript-obfuscator style, hex-escaped string table, control-flow flattening). index.js requires ./lib/config on line 6, so the payload runs as soon as the package is required; the exported 'middleware' is a no-op. The dependency axios, which pino does not use, was added for the payload. package.json carries a fake author (Robert King ) and no repository. Behavior observed when lib/config.js is loaded in an instrumented sandbox: (1) child_process.spawn of a detached node process (node --max-old-space-size=4096 --no-warnings -, script fed over stdin, stdout and stderr ignored, windowsHide: true, detached: true), i.e. a hidden background process that outlives the parent; (2) code construction through the Function constructor; (3) 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=301, a tag t=3, a timestamp and a SHA-256 'validation' header. The messages posted are 'Starting client', 'Spawning autoUploadScript', 'Spawning ldbScript', 'Spawn",
    "evidence": "osv:MAL-2026-17662",
    "products": [
      {
        "name": {
          "value": "hardhat-promised",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.21.0",
            "evidence": "/affected/0/versions"
          }
        ]
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "MAL-2026-17662",
      "aliases": [
        "MAL-2026-17662"
      ],
      "affected": [
        {
          "package": {
            "name": "hardhat-promised",
            "purl": "pkg:npm/hardhat-promised",
            "ecosystem": "npm"
          },
          "versions": [
            "2.21.0"
          ],
          "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-promised/MAL-2026-17662.json",
            "indicators": {
              "evidence_files": [
                {
                  "path": "lib/config.js",
                  "tlsh": "bf1694889194e02b96df1753bf052afdd13aa876d0cca747c2d4be9d29ac80be475cd0",
                  "sha256": "7e4c6d76f1d845f752e37876a2d3f773996719f33c2d1c282e0a84b04444efeb"
                },
                {
                  "path": "README.md",
                  "tlsh": "b341946783e46bba4b6301b1a1c275aaff5f931c3faa60a5d89cc1291319497813220a",
                  "sha256": "987942c23bee23c44a75d53b8a8fd119dbf7ba6de6a199c41f0e86e0fd97abfc"
                }
              ],
              "package_integrity": [
                {
                  "hashes": {
                    "sha1": "0c83fd872e723e8c68c7b6c893637859fb1a7907",
                    "sha512_sri": "sha512-KXS8g9ekQoJaw+aqbVVcFd/8spKYRQ219UBZ50mCdL5cMWascvC2I69R8T/DM19nYqF9cs+MTO672YS0RBnb7w=="
                  },
                  "filename": "hardhat-promised-2.21.0.tgz"
                }
              ]
            }
          }
        }
      ],
      "modified": "2026-10-08T22:45:06.803701199Z",
      "provider": "osv",
      "references": [
        "https://www.npmjs.com/package/hardhat-promised/v/2.21.0"
      ],
      "provider_metadata": {
        "iocs": {
          "ips": [
            "167.88.172.33"
          ],
          "urls": [
            "http://167.88.172.33:8087/api/log"
          ],
          "files": [
            {
              "note": "obfuscated payload, required by index.js line 6; spawns detached node, posts host identity to 167.88.172.33:8087",
              "paths": [
                "lib/config.js"
              ],
              "source": "PACKAGE_ARCHIVE",
              "digests": {
                "sha256": "7e4c6d76f1d845f752e37876a2d3f773996719f33c2d1c282e0a84b04444efeb"
              }
            },
            {
              "note": "replaced pino entry point that loads lib/config.js",
              "paths": [
                "index.js"
              ],
              "source": "PACKAGE_ARCHIVE",
              "digests": {
                "sha256": "4e6c4e61a7019ab0affe9c2d20e36701b330ec357be205930355bac1464f9316"
              }
            }
          ]
        },
        "malicious-packages-origins": [
          {
            "id": "IN-MAL-2026-021134",
            "sha256": "306eed59a2a4d15563101a3bfde19c1d6d5e0c9152cb0f3d0f421331e075ef4e",
            "source": "amazon-inspector",
            "versions": [
              "2.21.0"
            ],
            "import_time": "2026-10-08T03:50:30.145091373Z",
            "modified_time": "2026-10-08T03:44:05Z"
          }
        ]
      }
    },
    "related_cves": [],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 107821,
  "published_at": "2026-10-08T03:44:05+00:00"
}