LWA-2026-6726 MAL-2026-10511 ↗ confirmed malware

type-swap@3.1.3

Malicious code in type-swap (npm)

T1195.002 · Compromise Software Supply ChainT1059.007 · JavaScriptT1105 · Ingress Tool TransferT1071.001 · Web Protocols

Analysis

type-swap@3.1.3 is a trojanized clone of the pino logger package. On require(), index.js spawns a detached child process running lib/caller.js. That script fetches attacker-controlled content from hxxps://jsonhosting[.]com/api/json/e16583b1/raw, extracts a "cookie" value from the JSON response, and executes it as arbitrary code via the Function constructor with access to Node.js require(). The remote payload can perform any action including credential theft, data exfiltration, or backdoor installation. The package's README is a verbatim copy of the legitimate pino logger documentation, but the package name and code are unrelated.

analyzed by
Leitwacht
first seen
Jul 13, 2026, 09:44 PM
analyzed
Jul 13, 2026, 09:45 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.