chai-as-serializednpm
chai-as-serialized is a confirmed malicious npm package (MAL-2026-10044) that opens a backdoor for remote access (malicious version 7.0.8). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in chai-as-serialized (npm)
What this malware does
The package's main entry (index.js) spawns a detached node child process running lib/initializeCaller.js as a side effect of invoking the exported middleware factory. lib/initializeCaller.js constructs a fake process.env object whose fields hold base64 blobs; DEV_API_KEY decodes to https://tomato-brunhilda-40.tiiny.site/index.json and DEV_SECRET_KEY/DEV_SECRET_VALUE decode to an x-secret-key request header. The script fetches the JSON body from that anonymous host and executes it via new Function.constructor("require", response)(require), granting the remote host arbitrary code execution with require access in the installer/consumer's Node process. The package name mimics chai-as-promised and the README is copied from pino (pino badges, pino narrative, keywords fast,logger,stream,json), while the shipped code has no relation to either — the impersonation is a lure to attract installs to a remote-code-execution dropper. Base64-encoding of the C2 URL and header, disguised as environment-variable configuration, confirms hostile intent.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Backdoor / remote accessFind it
Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for chai-as-serialized (version 7.0.8). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging chai-as-serialized across your stack and pipelines.
If you installed it — respond
chai-as-serialized establishes remote access, so treat any host that installed it as fully compromised. Isolate the machine, remove the package, rotate all credentials it could reach, and rebuild from a trusted image rather than cleaning in place — a backdoor may have planted additional persistence.
Did it already run?
If chai-as-serialized 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.
How O3 protects you
O3 blocks chai-as-serialized 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
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks chai-as-serialized-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the C2 callback and severs the channel.