LWA-2026-6167 MAL-2026-10491 ↗ confirmed malware

assertcoreutils@2.3.2

Malicious code in assertcoreutils (npm)

T1195.002 · Compromise Software Supply ChainT1059.007 · JavaScriptT1105 · Ingress Tool TransferT1071.001 · Web ProtocolsT1573 · Encrypted Channel

Analysis

assertcoreutils@2.3.2 is a trojanized clone of the Chai assertion library. The package ships the real Chai v4.3.8 source code (chai.js) but replaces the entry point with a custom index.js that, on require(), spawns a detached background Node process. That process runs a heavily obfuscated script (lib/chai/utils/addAssertion.js) which constructs a URL via query parameter, HTTP GETs the response, and executes it through new Function(..., responseBody)(require), achieving arbitrary remote code execution on the installer's machine. The attacker-controlled remote endpoint dictates the full second-stage payload. The package's homepage (assertcoreutilsutils[.]com) is a suspicious lookalike domain with no legitimate content.

analyzed by
Leitwacht
first seen
Jun 30, 2026, 08:23 AM
analyzed
Jun 30, 2026, 08:24 AM

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.