MAL-2026-12348 Malicious code in chai-as-rendered (npm)
Malicious package
Published
MAL-2026-12348 is a malicious package: chai-as-rendered (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-12348/ (Markdown: https://insights.sbomify.com/MAL-2026-12348/index.md)
- Package
- chai-as-rendered
- Registry
- npm
What is MAL-2026-12348?
MAL-2026-12348 is a malicious package in chai-as-rendered, published on 5 Aug 2026.
Official description
Typosquat of chai-as-promised. The package's exported middleware spawns a detached child process (lib/caller.js) that fetches a JSON payload from a base64-obfuscated jsonstorage.net URL (https://api.jsonstorage.net/v1/json/2ef8c758-a96f-459e-b036-b3b90379a165/f89e8264-86c2-4684-94da-c3f82d59370f) and evaluates the returned.cookie string via new Function.constructor("require", s)(require), giving the fetched code full require access on the installer's host. The remote URL and request headers are stored as base64 strings under fake process.env names (DEV_API_KEY, DEV_SECRET_KEY, DEV_SECRET_VALUE) and decoded with atob() at runtime to conceal the destination. The package name and keywords (fast, logger, stream, json) impersonate pino while the package name typosquats chai-as-promised.
What should I do about MAL-2026-12348?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.