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

chai-as-regulatednpm

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

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

What this malware does

Package is published as chai-as-regulated, a name mimicking the widely-used chai-as-promised Chai plugin, and the README instructs users to register it via chai.use(chaiAsRegulated). The shipped code, however, does not implement a Chai plugin: the tarball contains Pino logger source files (lib/levels.js, lib/proto.js, lib/tools.js, lib/transport.js, docs referencing pinojs/pino), and the package.json description is unrelated boilerplate ("This document describes the management of vulnerabilities for the project and all modules within the organization."). The exported middleware in index.js (lines 32-50) calls runBackgroundTask, which uses child_process.spawn('node', [scriptPath, JSON.stringify(args)], { detached: true, stdio: 'ignore' }) followed by child.unref() to silently launch ./lib/initializeCaller.js as a detached background process passing caller-supplied arguments. The referenced initializeCaller.js is absent from this tarball, so no payload executes today, but the loader shape (typosquat name + identity lie + detached orphan-process spawner pointing at a sibling file) is structured for a future-version payload swap. The combination of name confusion against a popular target, copied unrelated source used as cover, and a silent background-launcher wired into the advertised API exceeds the bar for typosquat-with-payload-shape.

Malicious versions

1 flagged
2.0.12

Indicators of compromise (SHA-256)

67f7f8d21f5d33db136b1e10fc7fbb6d2a1540240911b0630e7fc9f8724c7b26

Detection & response playbook

Typosquat
  1. Find it

    Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for chai-as-regulated (version 2.0.12). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging chai-as-regulated across your stack and pipelines.

  2. If you installed it — respond

    chai-as-regulated is a typosquat — you almost certainly intended a legitimately-named package. Remove chai-as-regulated, install the correct package, and rotate any secrets exposed during the install since post-install scripts may have already run.

  3. Did it already run?

    If chai-as-regulated was ever installed, its post-install/runtime payload may have already executed. O3's L7 egress monitoring and runtime eBPF sensors detect the credential exfiltration or command-and-control callback after install and block the malicious outbound channel, so you catch and contain the actual compromise — not just the presence of the package.

  4. How O3 protects you

    O3 blocks chai-as-regulated before install through its supply-chain scanner, and if it has already run, detects and severs the exfiltration or C2 callback at runtime through L7 egress monitoring and eBPF.

Frequently asked questions

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

Campaign

IN-MAL-2026-002726

References

Credits

  • Amazon Inspector · finder

Detect & block this

O3 blocks chai-as-regulated-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.

chai-as-regulated (npm) malicious package — MAL-2026-3753 | O3 Security