chai-as-relay (npm) · Malicious Code
Affects chai-as-relaySource GCVE Database
Malicious package : remove chai-as-relay and rotate any secrets on hosts that installed it.
Data as of 27 Sep 2026, 04:45 UTC
Malicious package
Published to npm · OSV MAL-2026-17189
What to do
Remove chai-as-relay from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmchai-as-relay | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The npm package 'chai-as-relay' version 1.2.1 contains a heavily obfuscated, multi-megabyte self-executing code blob that executes upon requiring the package. This package impersonates the legitimate 'pino' logger project by copying its non-malicious files but includes a malicious payload that allows arbitrary code execution. The package author and name have no relation to the genuine pino maintainers, indicating a supply chain attack via a malicious package.