LWA-2026-6020 MAL-2026-6532 ↗ confirmed malware

chai-as-assured@7.1.2

Malicious code in chai-as-assured (npm)

T1195 · Supply Chain CompromiseT1059.007 · JavaScriptT1105 · Ingress Tool TransferT1071.001 · Web ProtocolsT1027 · Obfuscated Files or Information

Analysis

chai-as-assured@7.1.2 is a combosquat of the legitimate chai-as-promised package. Its main entry (lib/chai-as-assured.js) contains an immediately-invoked async function that base64-decodes a remote URL (hxxps://amethyst-lorrin-26[.]tiiny[.]site/index[.]json), fetches its content via axios with a custom HTTP header (x-secret-key), and executes the response as arbitrary JavaScript code via new Function.constructor("require", response), giving the remote payload full access to Node.js require(). The download retries up to 5 times on failure. The package also impersonates the real chai-as-promised author in its metadata.

analyzed by
Leitwacht
first seen
Jun 26, 2026, 05:22 PM
analyzed
Jun 26, 2026, 05:23 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.