LWA-2026-10781 MAL-2026-13616 ↗ confirmed malware

hardhat-cap@2.21.1

Malicious code in hardhat-cap (npm)

T1059.007 · JavaScriptT1082 · System Information DiscoveryT1071.001 · Web ProtocolsT1041 · Exfiltration Over C2 ChannelT1027 · Obfuscated Files or Information

Analysis

hardhat-cap@2.21.1 is a trojanized clone of the pino logger. On require, the package loads a 4MB obfuscated payload (lib/config.js) that fingerprints the host (hostname, OS, username, platform) and exfiltrates it to the remote host 167[.]88[.]167[.]54 over HTTP: a JSON beacon to port 8087 at /api/log and /api/notify, and a multipart file upload of sysinfo.txt to port 8085 at /upload. The payload is obfuscated with a javascript-obfuscator string-array decoder so the C2 endpoints are not visible as plaintext.

analyzed by
Leitwacht
first seen
Aug 7, 2026, 12:22 PM
analyzed
Aug 7, 2026, 12:23 PM

Related advisories

browse all confirmed advisories →

Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.