MAL-2026-17236
Vulnerability from ossf_malicious_packages
Published
2026-09-28 22:06
Modified
2026-09-28 22:06
Summary
Malicious code in mini-hardhat (npm)
Details

-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (fbdfc97da008f90f11ae03963e75237c8bb746cf93f9cdc5da43ba5807ed6c1e)

mini-hardhat@1.1.4 presents itself as a pino-like JSON logger, but its main entry exports a middleware factory that, on instantiation, spawns lib/caller.js as a detached, stdio-ignored, unref'd child process so execution survives the parent. lib/caller.js base64-decodes a hardcoded URL (stored under decoy keys named DEV_API_KEY/DEV_SECRET_KEY/DEV_SECRET_VALUE) resolving to https://ipinfo-encrypted-v1.vercel.app/api/auth/f1f097d93c318c92f0c5, POSTs to it via axios, and passes the response body directly to new Function.constructor("require", s)(require), granting the remote endpoint arbitrary code execution inside the consumer's Node.js process with full require access. The fetch is retried up to 5 times. The declared purpose (logger/vulnerability-management document) does not match the shipped code, the destination URL and headers are base64-obfuscated, and the delivery is engineered to persist beyond the parent process — the shape of an intentional remote-code-execution dropper.

CWE
  • CWE-506 - The product contains code that appears to be malicious in nature.

{
  "affected": [
    {
      "database_specific": {
        "cwes": [
          {
            "cweId": "CWE-506",
            "description": "The product contains code that appears to be malicious in nature.",
            "name": "Embedded Malicious Code"
          }
        ],
        "indicators": {
          "evidence_files": [
            {
              "path": "lib/caller.js",
              "sha256": "907c5279529f4522f6f298f80b6786b461b9b41e74a5025306eefddbb1e073d0",
              "tlsh": "d001bd8a61fc141c016522ea171fa03250a1e46b3909d9c0378c87824fb96be2a93adf"
            },
            {
              "path": "index.js",
              "sha256": "2956b023858d706a5e241cd28b845088e5f414c5f70bd5d8cb73cb427d081065",
              "tlsh": "5d213c81b9f11188065cd9c8b569e53a38e3c4377207b9b0e9ec87862bcf2080272ad7"
            }
          ],
          "package_integrity": [
            {
              "filename": "mini-hardhat-1.1.4.tgz",
              "hashes": {
                "sha1": "e35bad83737308b4bc8fa7402f14805f51876190",
                "sha512_sri": "sha512-pG74FZey+jnqQgbqrfQaLVwg0kXTjhsoKh29KkkvYoU2SPyy7Z6wf/vrFENyF3Na2tJ/oKy9kolsD6pMvwv0LQ=="
              }
            }
          ]
        }
      },
      "package": {
        "ecosystem": "npm",
        "name": "mini-hardhat"
      },
      "versions": [
        "1.1.4"
      ]
    }
  ],
  "credits": [
    {
      "contact": [
        "inspector-research@amazon.com"
      ],
      "name": "Amazon Inspector",
      "type": "FINDER"
    }
  ],
  "database_specific": {
    "malicious-packages-origins": [
      {
        "id": "IN-MAL-2026-020619",
        "import_time": "2026-09-28T22:18:23.411838804Z",
        "modified_time": "2026-09-28T22:06:31Z",
        "sha256": "fbdfc97da008f90f11ae03963e75237c8bb746cf93f9cdc5da43ba5807ed6c1e",
        "source": "amazon-inspector",
        "versions": [
          "1.1.4"
        ]
      }
    ]
  },
  "details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (fbdfc97da008f90f11ae03963e75237c8bb746cf93f9cdc5da43ba5807ed6c1e)\nmini-hardhat@1.1.4 presents itself as a pino-like JSON logger, but its main entry exports a middleware factory that, on instantiation, spawns lib/caller.js as a detached, stdio-ignored, unref\u0027d child process so execution survives the parent. lib/caller.js base64-decodes a hardcoded URL (stored under decoy keys named DEV_API_KEY/DEV_SECRET_KEY/DEV_SECRET_VALUE) resolving to https://ipinfo-encrypted-v1.vercel.app/api/auth/f1f097d93c318c92f0c5, POSTs to it via axios, and passes the response body directly to new Function.constructor(\"require\", s)(require), granting the remote endpoint arbitrary code execution inside the consumer\u0027s Node.js process with full require access. The fetch is retried up to 5 times. The declared purpose (logger/vulnerability-management document) does not match the shipped code, the destination URL and headers are base64-obfuscated, and the delivery is engineered to persist beyond the parent process \u2014 the shape of an intentional remote-code-execution dropper.\n",
  "id": "MAL-2026-17236",
  "modified": "2026-09-28T22:06:31Z",
  "published": "2026-09-28T22:06:31Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/mini-hardhat/v/1.1.4"
    }
  ],
  "schema_version": "1.7.4",
  "summary": "Malicious code in mini-hardhat (npm)"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…