chai-as-gateway (npm) · Malicious Code
Affects chai-as-gatewaySource GCVE Database
Malicious package : remove chai-as-gateway and rotate any secrets on hosts that installed it.
Data as of 19 Aug 2026, 14:41 UTC
Malicious package
Published to npm · OSV MAL-2026-14200
What to do
Remove chai-as-gateway 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-gateway | 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-gateway' version 7.1.5 contains malicious code that executes automatically upon import. It masquerades as a logger package by copying documentation from a legitimate package but actually runs a large obfuscated script. This script attempts to harvest AWS credentials by traversing directories and exfiltrates the data over HTTP. The package name and metadata are deceptive, designed to trick users into installing it. No official patch or fix is currently documented.