MAL-2026-10043 Malicious code in chai-as-modified (npm)
Malicious package
Published
MAL-2026-10043 is a malicious package: chai-as-modified (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-10043/ (Markdown: https://insights.sbomify.com/MAL-2026-10043/index.md)
- Package
- chai-as-modified
- Registry
- npm
What is MAL-2026-10043?
MAL-2026-10043 is a malicious package in chai-as-modified, published on 9 Jul 2026.
Official description
Package name is a 1-2 character variant of the widely-used
chai-as-promised plugin. The exported function — the entry point users pass to chai.use(...) per the copied pino README — invokes a runBackgroundTask helper that spawns a detached node subprocess (detached: true, stdio: 'ignore', child.unref()) running a sibling ./lib/initializeCaller.js, then returns a no-op pass-through middleware. The detached, unref'd child is decoupled from the parent test runner and outlives it — an out-of-band execution channel that has no relationship to the advertised purpose of a chai assertion plugin. The lib/ directory ships a verbatim copy of unrelated pino source as decoy content, and the README is copied from pinojs/pino. In this specific tarball the referenced ./lib/initializeCaller.js file is not present, so the fork currently errors out, but the launcher stub, name-confusion vector, decoy content, and covert-execution mechanism are all in place; the missing payload is consistent with a staged release or intended delivery via a sibling/subsequent publish.What should I do about MAL-2026-10043?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.
Sources
Also known as GHSA-mq6v-3fqr-9cp6.