mocha-no-only (npm) · Malicious Code
Affects mocha-no-onlySource GCVE Database
Malicious package : remove mocha-no-only and rotate any secrets on hosts that installed it.
Data as of 29 Oct 2026, 23:04 UTC
Malicious package
Published to npm · OSV MAL-2025-49022
What to do
Remove mocha-no-only 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 |
|---|---|---|
| npmmocha-no-only | 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 'mocha-no-only' version 9.9.0 contains malicious code that installs a dependency from a custom domain which executes an information stealer during installation. This malware targets sensitive tokens related to npm, git, and CI/CD environments. Any system with this package installed should be considered fully compromised, and all secrets and keys stored on that system must be rotated immediately from a different, trusted machine. Removing the package alone does not guarantee removal of all malicious components.