MAL-2026-13609

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/hardhat-set/MAL-2026-13609.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-13609
Published
2026-08-07T12:57:29Z
Modified
2026-08-07T13:49:47.292660373Z
Summary
Malicious code in hardhat-set (npm)
Details

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

Source: amazon-inspector (7cf6b9d0ee4a23bfab6e7a3c21f69a36e0655019cf1dd602f93760e233c7f701)

The package is published as 'hardhat-set' but its README.md, docs/, and index.d.ts are copied verbatim from the unrelated pino logger project (github.com/pinojs/pino), while package.json declares author 'Robert King hello@jsonspack.com' with bugs URL 'https://jsonspack.com/issues'. index.js executes const config = require('./lib/config') at load time; lib/config.js is a 4,060,622-byte single-line file packed with obfuscator.io (23,931-entry rotated string array, RC4/base64 string decoder, control-flow flattening, self-defending checks) and runs a top-level IIFE on require. No other file in the package references config's exports, and pino itself contains no such module. The combination of a name/README mismatch (pino cover story on a package named after Hardhat), an unrelated author domain, and a multi-megabyte obfuscated blob that self-executes on import is a masquerade/typosquat delivering a hidden payload to anyone who installs or requires the package.

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-017077",
            "import_time": "2026-08-07T13:32:44.112846411Z",
            "sha256": "7cf6b9d0ee4a23bfab6e7a3c21f69a36e0655019cf1dd602f93760e233c7f701",
            "modified_time": "2026-08-07T12:57:29Z",
            "source": "amazon-inspector",
            "versions": [
                "2.21.0"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / hardhat-set

Package

Affected ranges

Affected versions

2.*
2.21.0

Database specific

cwes
[
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code"
    }
]
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/hardhat-set/MAL-2026-13609.json"
indicators
{
    "package_integrity": [
        {
            "filename": "hardhat-set-2.21.0.tgz",
            "hashes": {
                "sha512_sri": "sha512-aV2h0irREOmbNOAa3zKRjZK5T5dE6lzAGbDEp2Pm8T1T0+5h7uH7UpTKKe08P6Su/KVLThs4V7iv1Mu1iFnDPA==",
                "sha1": "3c68ae78c094294bbdbf78ab87ddb47f7a76ff77"
            }
        }
    ],
    "evidence_files": [
        {
            "tlsh": "ab1674488181f02393cd5b63bf457aecfc7a68a694cc654b8559bd2de8bc40bd9e2cc4",
            "sha256": "c9b83cdf9b6c915f02485cce0d993653a07cb78d12317904270f808e65529c30",
            "path": "lib/config.js"
        },
        {
            "tlsh": "2a017620deb88e2301ed25424c2a5643ba618c1b6528fc2932dba12c0f9d5fb01bf21d",
            "sha256": "f10a8bc9cb7f811ac125d88d35cf3ae5ad58b81e7591df108044e019c8a38a42",
            "path": "package.json"
        }
    ]
}