chai-smart@2.3.5
Malicious code in chai-smart (npm)
Analysis
chai-smart is a combosquat of the popular "chai" testing library. When required, index.js spawns a detached background process that runs lib/initializeCaller.js. That script decodes a base64-embedded C2 URL (hxxps://ipcheck-hashed[.]vercel[.]app/api/auth/6c1d60d35852ef0c05df), POSTs all environment variables (process.env) to that endpoint — exfiltrating any API keys, tokens, and secrets present in the runtime environment — then executes the server's response as arbitrary code via new Function("require", response.data), giving the attacker full remote code execution on the victim's machine.
- analyzed by
- Leitwacht
- first seen
- Jul 7, 2026, 11:07 AM
- analyzed
- Jul 7, 2026, 11:08 AM
Related advisories
- express-mongo-limit@2.0.1
- zluri-ad-connector@9.9.9
- pinokio-redis@1.0.127
- @bobfrankston/gcal@0.1.68
- @bobfrankston/mailx-store-web@0.1.35
- debugcli@4.3.4
- polymarket-trader-apis@0.1.0
- polymarket-apis@1.1.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.