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
hxxps://github[.]com/Hexa-devy/node-fetch-utils Request takedown / dispute →Related advisories
- sync-external@1.6.0
- anthropic-claude-latest@4.7.1
- kisama-js@0.1.8
- @resolvx/core@2.4.2
- st-pathhelper@1.0.0
- protectstraizolib@1.0.8
- period-newline@0.1.0
- chalk-plus-js@7.0.4
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.