Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
Malicious package

chai-as-modifiednpm

Advisory published Updated

chai-as-modified is a confirmed malicious npm package (MAL-2026-10043) that executes malicious code on install (malicious version 6.0.4). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in chai-as-modified (npm)

MAL-2026-10043
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall chai-as-modified

What this malware does

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.

Malicious versions

1 flagged
6.0.4

Indicators of compromise (SHA-256)

ab841cd3ab01bfcd1257a214489b41f10e236779e236a0672642777160245a9e
06f9a0e0b21d9fffe3cff7076c5e5c19183f7430718e8f408669b5180669b797

Detection & response playbook

Malicious package
  1. Find it

    Search your lockfiles and build artifacts for chai-as-modified (version 6.0.4).

  2. If you installed it — respond

    Remove chai-as-modified from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.

  3. Did it already run?

    If chai-as-modified was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.

Frequently asked questions

No. chai-as-modified on npm has been identified as a malicious package (version 6.0.4 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

IN-MAL-2026-009145RLMA-2026-06120

References

Credits

  • Amazon Inspector · finder
  • ReversingLabs · finder

Detect & block this

O3 blocks chai-as-modified-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.

Explore

chai-as-modified (npm) malicious package — MAL-2026-10043 | O3 Security