nps-retrieval-diagnostics (npm) · Malicious Code
Affects nps-retrieval-diagnosticsSource GCVE Database
Malicious package : remove nps-retrieval-diagnostics and rotate any secrets on hosts that installed it.
Data as of 10 Jul 2026, 10:16 UTC
Malicious package
Published to npm · OSV MAL-2026-10066
What to do
Remove nps-retrieval-diagnostics 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 |
|---|---|---|
| npmnps-retrieval-diagnostics | 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 nps-retrieval-diagnostics npm package version 9.9.9 contains malicious code that installs persistent backdoor access on the host. When executed, it adds a cron job running every 10 minutes that contacts a remote server and modifies the user's shell configuration to maintain persistence. It also attempts to harvest environment variables that resemble credentials. The package masquerades as an internal diagnostic tool and uses social engineering to trick operators into running it. This is consistent with a dependency confusion attack targeting internal package names.