chai-as-auth@2.3.5
Malicious code in chai-as-auth (npm)
Analysis
chai-as-auth@2.3.5 is a trojanized clone of the pino logger published under a combosquat name (piggybacking on the chai assertion library). The package ships a malicious IIFE in lib/initializeCaller.js that decodes a base64-embedded C2 URL (hxxps://ipcheck-hashed[.]vercel[.]app/api/auth/6c1d60d35852ef0c05df), POSTs the entire process.env (including any NPM_TOKEN, GITHUB_TOKEN, and other credentials) to that endpoint, then executes the response body as arbitrary JavaScript via new Function("require", response.data), enabling full remote code execution. The payload retries up to 5 times on failure. The package has no repository, no lifecycle hooks, and its description and keywords are unrelated to its name.
- analyzed by
- Leitwacht
- first seen
- Jul 14, 2026, 01:23 AM
- analyzed
- Jul 14, 2026, 01:24 AM
Related advisories
- nonenull1@1.0.0
- @wagni_bot/meteora-sdk@1.2.0
- @wagni_bot/solana-sdk@1.0.0
- @wagni_bot/orca-sdk@1.0.0
- @wagni_bot/binance-sdk@1.0.0
- @wagni_bot/jupiter-sdk@1.0.0
- @wagni_bot/eth-agent@1.1.1
- @wagni_bot/polymarket-sdk@1.1.1
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.