{"answers":{"affected":"1 open source package ship an affected version, including hardhat-promised.","exploited":"There is no known exploitation of MAL-2026-17662 in the wild and no public exploit code.","fix":"Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.","what":"MAL-2026-17662 is a malicious package in hardhat-promised, published on 8 Oct 2026."},"fix_prompt":"MAL-2026-17662 is a malicious package: hardhat-promised (npm). Every version was published to cause harm.\n\nTask:\n1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.\n2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.\n3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.\n4. If the package is not used anywhere, say so and change nothing.\n\nReference: https://insights.sbomify.com/MAL-2026-17662/ (Markdown: https://insights.sbomify.com/MAL-2026-17662/index.md)","id":"MAL-2026-17662","markdown":"https://insights.sbomify.com/MAL-2026-17662/index.md","name":"MAL-2026-17662","record":{"aliases":[],"analysis":null,"analysis_generated_by":null,"assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"hardhat-promised@2.21.0 was published to npm on 2026-10-06 13:59 UTC by user ryan.danial915 (account's only package, created the same day). The name targets the Ethereum development tool hardhat. The package is a verbatim copy of the pino logger (README, docs, lib/*.js, SECURITY.md; the README badges still point to pino) with one file added that pino does not contain: lib/config.js, a single-line 4,373,384-byte obfuscated script (javascript-obfuscator style, hex-escaped string table, control-flow flattening). index.js requires ./lib/config on line 6, so the payload runs as soon as the package is required; the exported 'middleware' is a no-op. The dependency axios, which pino does not use, was added for the payload. package.json carries a fake author (Robert King \u003chello@jsonspack.com\u003e) and no repository.\n\nBehavior observed when lib/config.js is loaded in an instrumented sandbox: (1) child_process.spawn of a detached node process (node --max-old-space-size=4096 --no-warnings -, script fed over stdin, stdout and stderr ignored, windowsHide: true, detached: true), i.e. a hidden background process that outlives the parent; (2) code construction through the Function constructor; (3) axios.post of JSON to http://167.88.172.33:8087/api/log containing os.hostname(), os.platform()/release()/type() and os.userInfo().username, with a fixed key ukey=301, a tag t=3, a timestamp and a SHA-256 'validation' header. The messages posted are 'Starting client', 'Spawning autoUploadScript', 'Spawning ldbScript', 'Spawning socketScript' and the matching 'Failed to spawn ...' errors, which name three stealer modules: automatic file upload, LevelDB (browser extension / wallet storage) reading, and a persistent socket connection to the operator.\n\nTrigger: on import (require). Type: trojanized copy of a popular library acting as an information-stealer loader with a hard-coded C2 at 167.88.172.33:8087.\n\nThe npm package hardhat-promised impersonates the pino logger: it ships pino's README (with pino shields.io badges linking to npmjs.com/package/pino), LICENSE, docs/, index.d.ts, and lib/ directory layout verbatim, while publishing under an unrelated name. index.js is a thin cover-story stub mirroring pino's public API and, at module top level, executes `require('./lib/config')`. lib/config.js is a 4,373,384-byte obfuscator.io-packed script (26,185-entry rotating string array, ~134k deobfuscation transforms, hex-escaped bootstrapper of the form `(function(a,z){const kb={...}})`) with no relation to the small constants module it replaces in real pino. Any consumer that requires this package executes the opaque 4.3MB blob on the installer's host at library load. The combination of unrelated-package impersonation, injected multi-megabyte obfuscated code where a trivial config module is advertised, and top-level execution on import is the trojanized-logger shape used to smuggle installer-harm code into dependency trees.","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":false,"headline":"Malicious code in hardhat-promised (npm)","id":"MAL-2026-17662","indexable":true,"kev":null,"kind":"malicious","links":{"ecosystem":"npm","product":null,"products":[],"type":null,"year":"2026"},"n_packages":1,"n_references":null,"packages":[{"ecosystem":"npm","fixed":[],"introduced":[],"last_affected":[],"package":"hardhat-promised","purl":"pkg:npm/hardhat-promised","source":"MAL-2026-17662"}],"products":null,"published":"2026-10-08","related":[],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"OpenSSF Malicious Packages","prefix":"MAL"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":null,"url":"https://insights.sbomify.com/MAL-2026-17662/"}