LWA-2026-6162 MAL-2026-10052 ↗ confirmed malware

chai-promised-test@1.3.5

Malicious code in chai-promised-test (npm)

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

Analysis

chai-promised-test@1.3.5 is a trojanized clone of the pino logger published under a misleading name. Upon require(), the package spawns a detached background Node.js process (stdio:ignore, unref'd) that executes lib/caller.js. This file sends an HTTP GET request to hxxps://jsonkeeper[.]com/b/EXSIF with a custom header x-secret-key: _, reads response.data.cookie from the response, and passes the retrieved string into the Function constructor to execute as arbitrary code with access to the require() function. The remote URL is attacker-controlled and can serve any malicious second-stage payload. The package also suppresses console.log during execution and retries up to 5 times.

analyzed by
Leitwacht
first seen
Jun 29, 2026, 08:47 PM
analyzed
Jun 29, 2026, 08:54 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.