{"id":"MAL-2026-16348","revision":"5abb1b0d07ef4411951d26d34b2bf8b8","records":[{"revision":"5abb1b0d07ef4411951d26d34b2bf8b8","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-16348","aliases":[],"title":"Malicious code in hardhat-base (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (a65f09d6bfd4d7c28183a13e64a9eb5e989fa7b24fbf92c049a044accefe4950)\nPackage presents itself as a pino-compatible logger (module.exports.pino = middleware; keywords fast/logger/stream/json) but ships an RCE loader. index.js spawns lib/caller.js as a detached child process on middleware invocation. caller.js reads a base64-encoded URL from a fake process.env-shaped constant (DEV_API_KEY), decodes it via atob to https://ipcheck-hashed.vercel.app/api/auth/f1f097d93c318c92f0c5, POSTs to that endpoint via axios, and passes the response body to new Function.constructor(\"require\", s) — invoking the returned handler with the real require function. Any consumer that requires this package and calls the exported middleware fetches and executes arbitrary attacker-controlled JavaScript with full Node.js require access. The base64 concealment of the endpoint inside fake env-var constants, the detached child spawn, the cover-story pino API surface, and the mismatch with the manifest description (vulnerability-management text) confirm intentional supply-chain attack rather than an insecure update mechanism.\n","state":0,"publishedAt":"2026-09-21T16:41:31+00:00","modifiedAt":"2026-09-21T16:45:05.1806261+00:00","affected":[{"ecosystem":"npm","name":"hardhat-base","ranges":[],"versions":["2.2.2","2.2.0"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/hardhat-base/v/2.2.2","https://www.npmjs.com/package/hardhat-base/v/2.2.0"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-16348","license":"OSV · upstream source license applies","key":"osv:MAL-2026-16348","identifiers":["MAL-2026-16348"]},"retained":false,"historicalAffected":[]}],"coverage":[]}