node-fetch-utils@1.2.1
Malicious code in node-fetch-utils (npm)
Analysis
node-fetch-utils@1.2.1 is a trojanized combosquat package impersonating a fetch-utility library. The package's publishable code (index.js, retry.js, cache.js) is legitimate, but the tarball includes a hidden C2 implant at scripts/postinstall.js that activates on Windows targets. The implant XOR-decodes a C2 server address (node22[.]lunes[.]host:3258) and uses HMAC-SHA256-based rolling auth tokens. It downloads XOR-keystream-encrypted Python bytecode from the C2 via HTTP GET, writes a self-cleaning Python launcher to %TEMP%, and executes the payload via VBScript/wscript.exe in a hidden detached process that escapes the npm job object. The package also depends on node-fetch-core (a known malware package) fetched via an unpinned GitHub master-branch tarball URL, allowing the attacker to swap its contents at any time.
- analyzed by
- Leitwacht
- first seen
- Jun 21, 2026, 10:13 PM
- analyzed
- Jun 21, 2026, 10:14 PM
- weekly installs
- 470
Related advisories
- anthropic-claude-latest@4.7.1
- txs-data@1.0.1
- solana-token-api@1.0.0
- pocbitbarrontest@1.0.0
- self-certificate@1.0.0
- meowmeow111@1.0.0
- meowmeow11001@1.0.0
- @ethers-js/contracts@6.9.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.