MAL-2026-13701 Malicious code in chai-as-format (npm)
Malicious package
Published
MAL-2026-13701 is a malicious package: chai-as-format (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-13701/ (Markdown: https://insights.sbomify.com/MAL-2026-13701/index.md)
- Package
- chai-as-format
- Registry
- npm
What is MAL-2026-13701?
MAL-2026-13701 is a malicious package in chai-as-format, published on 10 Aug 2026.
Official description
The package's index.js unconditionally requires./lib/config, which is a ~4MB single-line file consisting of an obfuscator.io-style hex-encoded string array (23,953 entries) with rotate/decoder functions and heavy control-flow flattening. This obfuscated code executes at every require('chai-as-format') on the installer's machine. The package presents itself under the name chai-as-format but its README, LICENSE, docs, and lib/* content are copied from the unrelated pino logging framework (LICENSE cites pinojs/pino), while the package.json description references vulnerability management — the cover story does not match the shipped content. A multi-megabyte opaque decoder auto-loaded on import is not a legitimate config module; the shape is a trojan loader hidden behind an impersonation shell.
What should I do about MAL-2026-13701?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.