{"id":"MAL-2026-13609","summary":"Malicious code in hardhat-set (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (7cf6b9d0ee4a23bfab6e7a3c21f69a36e0655019cf1dd602f93760e233c7f701)\nThe 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 \u003chello@jsonspack.com\u003e' 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.\n","modified":"2026-08-07T13:49:47.292660373Z","published":"2026-08-07T12:57:29Z","database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","versions":["2.21.0"],"id":"IN-MAL-2026-017077","import_time":"2026-08-07T13:32:44.112846411Z","modified_time":"2026-08-07T12:57:29Z","sha256":"7cf6b9d0ee4a23bfab6e7a3c21f69a36e0655019cf1dd602f93760e233c7f701"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/hardhat-set/v/2.21.0"}],"affected":[{"package":{"name":"hardhat-set","ecosystem":"npm","purl":"pkg:npm/hardhat-set"},"versions":["2.21.0"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","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":[{"hashes":{"sha1":"3c68ae78c094294bbdbf78ab87ddb47f7a76ff77","sha512_sri":"sha512-aV2h0irREOmbNOAa3zKRjZK5T5dE6lzAGbDEp2Pm8T1T0+5h7uH7UpTKKe08P6Su/KVLThs4V7iv1Mu1iFnDPA=="},"filename":"hardhat-set-2.21.0.tgz"}],"evidence_files":[{"sha256":"c9b83cdf9b6c915f02485cce0d993653a07cb78d12317904270f808e65529c30","tlsh":"ab1674488181f02393cd5b63bf457aecfc7a68a694cc654b8559bd2de8bc40bd9e2cc4","path":"lib/config.js"},{"path":"package.json","sha256":"f10a8bc9cb7f811ac125d88d35cf3ae5ad58b81e7591df108044e019c8a38a42","tlsh":"2a017620deb88e2301ed25424c2a5643ba618c1b6528fc2932dba12c0f9d5fb01bf21d"}]}}}],"schema_version":"1.8.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}