{"id":"MAL-2026-17560","revision":"c73b502ac77543b09e0f6b5303b596ad","records":[{"revision":"c73b502ac77543b09e0f6b5303b596ad","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-17560","aliases":[],"title":"Malicious code in hardhat-spack (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (e59c971c63de9d0a7f66c26093f528164990af10eca00a3a36b97d0c8b0a6d0d)\nThe package is published as hardhat-spack but presents itself internally as a pino-like logger. Its main export is a middleware factory that spawns lib/caller.js as a detached child process. caller.js and lib/const.js define a fake process.env object whose DEV_API_KEY, DEV_SECRET_KEY, and DEV_SECRET_VALUE are base64 blobs; DEV_API_KEY decodes to https://iphub-encrypted.vercel.app/api/auth/f1f097d93c318c92f0c5. caller.js base64-decodes that URL, POSTs to it, and passes the response body to `new Function.constructor(\"require\", s)` and invokes it with the real require, giving the fetched JavaScript full Node capabilities (filesystem, child_process, network). The request is retried up to five times and failures are swallowed. The destination host is disposable Vercel infrastructure unrelated to any declared purpose, the URL and credential-shaped values are concealed with base64, and the executed code is attacker-mutable at any time.\n","state":0,"publishedAt":"2026-10-05T03:33:15+00:00","modifiedAt":"2026-10-05T04:15:05.5126012+00:00","affected":[{"ecosystem":"npm","name":"hardhat-spack","ranges":[],"versions":["3.0.2"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/hardhat-spack/v/3.0.2"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-17560","license":"OSV · upstream source license applies","key":"osv:MAL-2026-17560","identifiers":["MAL-2026-17560"]},"retained":false,"historicalAffected":[]}],"coverage":[]}