MAL-2026-10041 Malicious code in chai-as-buffered (npm)
Malicious package
Published
MAL-2026-10041 is a malicious package: chai-as-buffered (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-10041/ (Markdown: https://insights.sbomify.com/MAL-2026-10041/index.md)
- Package
- chai-as-buffered
- Registry
- npm
What is MAL-2026-10041?
MAL-2026-10041 is a malicious package in chai-as-buffered, published on 9 Jul 2026.
Official description
[email protected] is a typosquat lure (name resembles chai-as-promised; README and module exports impersonate the pino logger) whose actual behavior is a remote-payload dropper. lib/caller.js shadows
process with a local object whose env holds base64-encoded constants for the C2 URL, header name, and header value, hiding the destination from review and from env scanning. When the exported middleware is invoked (e.g., via chai.use(...) or require('chai-as-buffered') wiring through the pino-styled export), the package base64-decodes the hidden URL (https://api.jsonstorage.net/v1/json/2ef8c758-a96f-459e-b036-b3b90379a165/a179ea35-b962-4722-b3f1-e28316d1a44a), spawns a detached, stdio-ignored node./lib/caller.js child, fetches a JSON document from that mutable third-party blob, and passes the document's cookie field to Function.constructor('require', s) invoked with the live require. The fetched JavaScript executes with full require access on the installer's machine. The destination is an attacker-controlled mutable JSON store whose content can be changed at any time, giving the publisher arbitrary code execution against any environment that loads this package.What should I do about MAL-2026-10041?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.
Sources
Also known as GHSA-jvvq-ph8p-7cc9.