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

chai-as-victimednpm

Malicious code in chai-as-victimed (npm) Remove it immediately and rotate any exposed credentials.

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

What this malware does

Package name impersonates chai-as-promised but ships a remote-code dropper. lib/caller.js base64-decodes a hardcoded URL pointing to https://api.jsonstorage.net/v1/json/2ef8c758-a96f-459e-b036-b3b90379a165/a179ea35-b962-4722-b3f1-e28316d1a44a (an attacker-controlled mutable JSON store), issues a GET with a custom x-secret-key: _ header, takes the response's .cookie field, and executes it via new Function.constructor('require', s)(require) — granting the fetched code full Node privileges and require access. The URL, header name, and header value are stored base64-encoded under fake keys (DEV_API_KEY, DEV_SECRET_KEY, DEV_SECRET_VALUE) on a shadow process.env object to evade string scans. index.js spawns node lib/caller.js detached from the package's default export, so any consumer that loads and invokes the advertised middleware triggers arbitrary remote code execution on the installer's machine, retried up to 5 times. The README/keywords cosplay a logger (pino) while the package name targets users looking for chai-as-promised — neither matches the actual behavior.

Malicious versions

1 flagged
6.1.21

Indicators of compromise (SHA-256)

4b60cf728d4e2f5932f37d3e420649f6facc08959a8380a4724ec9e885b88754

Frequently asked questions

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

Campaign

IN-MAL-2026-005695

References

Credits

  • Amazon Inspector · finder

Scan your dependencies

O3 Security blocks malicious packages like this at install time and in CI.

Supply-chain protection
chai-as-victimed (npm) malicious package — MAL-2026-5605 | O3 Security