LWA-2026-5380 confirmed malware

util-free-ports@3.1.2

Malicious code in util-free-ports (npm)

T1195.002 · Compromise Software Supply ChainT1059.007 · JavaScriptT1480 · Execution GuardrailsT1027 · Obfuscated Files or InformationT1082 · System Information DiscoveryT1071.001 · Web ProtocolsT1105 · Ingress Tool Transfer

Analysis

During npm install, a preinstall hook (node ./dist/util.js) executes obfuscated JavaScript that performs anti-analysis checks — verifying CPU core count, memory, system uptime, MAC-address prefixes (matching VMware, VirtualBox, Xen, Docker, Hyper-V, KVM), and hostname blacklists — to evade sandboxes and CI environments. It first probes internet connectivity via a DNS query to ip[.]sb (an IP-address lookup service). If all checks pass, it fetches and eval()s a second-stage payload from a remote HTTPS server (address encoded in the obfuscated payload). The package bundles the legitimate LayUI frontend library (v2.9.21) and assets as camouflage; the malicious code resides entirely in dist/util.js.

analyzed by
Leitwacht
first seen
Jun 15, 2026, 01:45 PM
analyzed
Jun 15, 2026, 01:48 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.