chai-as-structured (npm) · Malicious Code
Affects chai-as-structuredSource GCVE Database
Malicious package : remove chai-as-structured and rotate any secrets on hosts that installed it.
Data as of 8 Sep 2026, 09:08 UTC
Malicious package
Published to npm · OSV MAL-2026-10622
What to do
Remove chai-as-structured 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-structured | 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-structured' version 7.0.5 is a malicious package designed to perform a supply-chain attack. It masquerades as a legitimate package but executes a detached Node.js child process that fetches and executes remote code with full Node privileges. The remote code is concealed using base64 encoding and is fetched from an anonymous file-hosting site. This behavior is consistent with intentional malicious activity rather than legitimate functionality.