MAL-2026-10047 Malicious code in chai-as-staged (npm)

Malicious package Published
Package
chai-as-staged
Registry
npm

What is MAL-2026-10047?

MAL-2026-10047 is a malicious package in chai-as-staged, published on 9 Jul 2026.

Official description

Package name impersonates the popular chai-as-promised testing library and the README is copied from pino. The advertised usage chai.use(chaiAsStaged) triggers a detached node child process that runs lib/initializeCaller.js. That file hides its C2 endpoint and a custom HTTP header name/value as base64 strings stored under decoy names (DEV_API_KEY, DEV_SECRET_KEY, DEV_SECRET_VALUE) inside a fake local process object; at runtime it base64-decodes the URL to https://amethyst-lorrin-26.tiiny.site/index.json, fetches it with the obfuscated header, extracts the .cookie field from the JSON response, and executes the returned JavaScript via new Function.constructor('require', response)(require) in a retry loop. Attacker-controlled code is therefore executed on the installer's machine with full require access whenever the library is used as documented. The combination of name/README impersonation, base64-obfuscated C2 on an anonymous static-hosting host, and dynamic code construction with require removes any benign interpretation.

What should I do about MAL-2026-10047?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

Sources

Also known as GHSA-fchw-g3j3-hxh3.

Is MAL-2026-10047 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free