MAL-2026-17236

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/mini-hardhat/MAL-2026-17236.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-17236
Published
2026-09-28T22:06:31Z
Modified
2026-09-28T22:30:06Z
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.

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"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / mini-hardhat

Package

Affected ranges

Affected versions

1.*
1.1.4

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=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/mini-hardhat/MAL-2026-17236.json"