{"id":"MAL-2026-17660","summary":"Malicious code in hardhat-option (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (2d460f6c739361d793fbc66b2aa32d1d9ab6fe0df4caefe13c590f40d05d5277)\nThe package's declared main index.js immediately requires./lib/config, which is a single-line ~4.5MB obfuscator.io-style bundle (26,234-entry hex-escaped string array, rotated decoder wrappers, control-flow flattening) whose top-level IIFE executes as soon as the module is loaded. The exported middleware is a no-op, so the sole effect of require('hardhat-option') is to run the opaque payload with the installer's privileges. The package also presents a false identity: the name is hardhat-option but README, index.d.ts and lib/* are copied from pinojs/pino and index.js re-exports module.exports.pino = middleware to satisfy consumers expecting pino's API, while package.json attributes authorship to 'Robert King \u003chello@jsonspack.com\u003e' with an unrelated bugs URL at jsonspack.com. A multi-megabyte, fully obfuscated module body that auto-executes on import inside a package falsely wrapped in another project's identity is the canonical loader/dropper shape.\n","modified":"2026-10-08T04:00:05.432013175Z","published":"2026-10-08T03:38:47Z","database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-021119","import_time":"2026-10-08T03:50:29.181798954Z","modified_time":"2026-10-08T03:38:47Z","sha256":"2d460f6c739361d793fbc66b2aa32d1d9ab6fe0df4caefe13c590f40d05d5277","source":"amazon-inspector","versions":["2.0.1"]}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/hardhat-option/v/2.0.1"}],"affected":[{"package":{"name":"hardhat-option","ecosystem":"npm","purl":"pkg:npm/hardhat-option"},"versions":["2.0.1"],"database_specific":{"cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}],"indicators":{"evidence_files":[{"sha256":"b01c59ae0a76527503799aab109bd701e34f260d192722a8cf12c97a4e6d208c","tlsh":"61265f889244e03796cf1ac3bf0529ede57aa861e4cca30797d4be5cb9ac40bd4b5dd0","path":"lib/config.js"},{"tlsh":"5e017620deb88e2301ed25825c2a0603b6a18c175528fc2933dba12c0fad5fb41bf22d","path":"package.json","sha256":"1e4d73a4b8f560ba835af847b248c85e0a7ae02253aa160504a5b5009f3cb746"}],"package_integrity":[{"filename":"hardhat-option-2.0.1.tgz","hashes":{"sha512_sri":"sha512-Xuhq5XHR/fIU8SmY4COyYjBbNHa5AA1QAJGj0gx013RxO919NrboN7DnYJqYGKgiRTeA4QYDg1sjgLA+7is6+A==","sha1":"1f82b713a392b01bd0b75c52654761c7866cef36"}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/hardhat-option/MAL-2026-17660.json"}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}