Malicious code in chai-as-soul (npm)
chai-as-soul@2.3.5 is a typosquat of the pino logging library containing malicious code that exfiltrates environment variables (including AWS/GCP/CI tokens) and executes arbitrary remote code on installation.
- Disclosed
- Last updated
- Blast radius
- Any Node.js project that installed chai-as-soul@2.3.5
- Ecosystems
- Attack vectors
- Affected entities
- chai-as-soul · 2.3.5
chai-as-soul@2.3.5 is a typosquatting package that copies the LICENSE, README, documentation, and lib/ directory from the legitimate pinojs/pino project while adding malicious functionality. The package.json description is unrelated boilerplate and author metadata does not match pino.
The malicious payload is contained in lib/initializeCaller.js, an immediately-invoked function expression (IIFE) that executes on require. The code base64-decodes a hardcoded URL (https://ipcheck-hashed.vercel.app/api/auth/6c1d60d35852ef0c05df) and uses axios to POST the entire process.env object to that endpoint with an x-secret-header, exfiltrating all environment variables including AWS credentials, GCP tokens, CI/CD secrets, and other sensitive data.
The attacker-controlled HTTP response is then executed as arbitrary JavaScript via new Function("require", response.data), giving the remote attacker full module access and arbitrary code execution in the Node.js process with the privileges of the installer.
This incident was identified by the OpenSSF malicious-packages project and reported via GitHub Security Advisory GHSA-c7j2-7fxx-qjq2.
Indicators of compromise
- Packages
- chai-as-soul
- Domains
- ipcheck-hashed.vercel.app
Remediation
- Immediately remove chai-as-soul from all projects and dependencies
- Audit all environment variables and secrets that may have been exposed; rotate AWS credentials, GCP service account keys, CI/CD tokens, and any other sensitive credentials
- Review process logs and network traffic for evidence of exfiltration to https://ipcheck-hashed.vercel.app/api/auth/6c1d60d35852ef0c05df
- If pino logging is required, install the legitimate pinojs/pino package from npm
- Implement package name verification and typosquatting detection in dependency management workflows
Sources
- GitHub Advisory GHSA-c7j2-7fxx-qjq2 · GitHub Advisory Database
Cite this entry
"Malicious code in chai-as-soul (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 21, 2026; last updated August 21, 2026. https://supplychainattack.org/incident/malicious-code-in-chai-as-soul-npm-j7t6su
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malicious code in chai-as-testkit (npm)
The npm package chai-as-testkit is a typosquat/impersonation attack delivering obfuscated malicious code that executes on import. The package falsely claims to be a vulnerability management tool but ships pino library files under a different author, with a synthetic stub that loads a 4MB+ obfuscated bundle containing attacker-controlled code.
npmTyposquattingCompromised package - resolvedcritical
Malicious code in create-coin (npm)
create-coin@20.1.1 on npm contained malicious postinstall code that collected sensitive environment variables, credentials, and host reconnaissance data. The package impersonated an esbuild platform build and exfiltrated data to a hardcoded endpoint.
npmCompromised packageTyposquatting - resolvedcritical
Malicious code in @next-fonts/font (npm)
@next-fonts/font is a typosquat package on npm that executes arbitrary attacker-controlled code via a blockchain-mediated C2 channel when its Inter() function is called. The malicious payload is base64-encoded and executed through Node.js spawn or eval, with no legitimate font functionality.
npmTyposquattingCompromised package - containedcritical
Malicious code in neverthrow-core (npm)
neverthrow-core@1.1.2 is a typosquat of the legitimate neverthrow library containing malicious code that executes arbitrary binaries from an unverified Dropbox URL during npm install via a preinstall script.
npmTyposquattingCompromised package