2026-02-05 — NPM package chai-as-advanced flagged as malware (GHSA-hw5g-4gvf-c7vh)¶
Summary¶
GitHub has published a malware advisory for the NPM package chai-as-advanced.
“Any computer that has this package installed or running should be considered fully compromised.”
- Advisory: https://github.com/advisories/GHSA-hw5g-4gvf-c7vh
- Ecosystem: npm
- Affected versions:
>= 0 - Patched versions: none
What to do (durable guidance)¶
If you find chai-as-advanced installed anywhere (directly or as a transitive dependency), treat it as an incident.
Immediate actions¶
- Contain
- Stop affected workloads (CI runner, dev machine, container, server).
-
Preserve evidence (process list, network connections, install logs, lockfiles).
-
Identify exposure
- Search across:
package.jsonpackage-lock.json/yarn.lock/pnpm-lock.yaml- build images and caches
-
Check whether it could have executed install hooks (
preinstall/install/postinstall). -
Rotate secrets from a clean machine
-
CI tokens, cloud credentials, SSH keys, registry tokens, app secrets.
-
Rebuild clean
- Prefer re-imaging (don’t rely on “remove the package” as remediation).
Longer-term hardening¶
- Prefer ephemeral CI runners; avoid shared caches for sensitive steps.
- Consider
npm --ignore-scriptswhere feasible. - Use lockfiles and review dependency diffs.
- Generate SBOMs and scan/attest builds.