MAL-2026-10175 Malicious code in chai-as-doc (npm)
Malicious package
Published
MAL-2026-10175 is a malicious package: chai-as-doc (npm). Every version was published to cause harm.
Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.
Reference: https://insights.sbomify.com/MAL-2026-10175/ (Markdown: https://insights.sbomify.com/MAL-2026-10175/index.md)
- Package
- chai-as-doc
- Registry
- npm
What is MAL-2026-10175?
MAL-2026-10175 is a malicious package in chai-as-doc, published on 10 Jul 2026.
Official description
The package presents itself as pino-style logging middleware but on require() spawns a detached Node child that runs lib/initializeCaller.js. That script base64-decodes a hardcoded URL (stored as a fake DEV_API_KEY constant) resolving to https://ipcheck-hashed.vercel.app/api/auth/6c1d60d35852ef0c05df, POSTs the entire process.env object to it with an x-secret-header, and then passes the HTTP response body to
new Function("require", response.data) and invokes it with the local require. This gives the remote host arbitrary code execution inside the installer's Node process with full environment/credential access. The base64 obfuscation of the endpoint, the disguised middleware cover story, and the name resembling chai/chai-as-promised are consistent with a typosquat supply-chain attack.What should I do about MAL-2026-10175?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.