chai-as-reddit (npm) · Malicious Code
Affects chai-as-redditSource GCVE Database
Malicious package : remove chai-as-reddit and rotate any secrets on hosts that installed it.
Data as of 26 Oct 2026, 16:18 UTC
Malicious package
Published to npm · OSV MAL-2026-10939
What to do
Remove chai-as-reddit 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-reddit | 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-reddit versions 7.0.2, 7.0.3, and 7.0.4 contain a trojaned distribution that executes a heavily obfuscated malicious payload immediately upon import or require. The package masquerades as a Chai plugin for Reddit API assertions but includes camouflage files copied from an unrelated project and an obfuscated 4MB JavaScript file that runs automatically, indicating a supply-chain attack. Any system with this package installed should be considered fully compromised.