secretkey2fa (npm) · Malicious Code
Affects secretkey2faSource GCVE Database
Malicious package : remove secretkey2fa and rotate any secrets on hosts that installed it.
Data as of 9 Sep 2026, 21:37 UTC
Malicious package
Published to npm · OSV MAL-2026-15559
What to do
Remove secretkey2fa 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 |
|---|---|---|
| npmsecretkey2fa | 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 'secretkey2fa' version 1.0.1, advertised as a lightweight TOTP/HOTP library, contains malicious code executed via a postinstall hook. This code steals Windows credentials by enumerating Credential Manager entries, extracts Microsoft Account tokens from Minecraft launcher files, decrypts Chromium browser cookies and credentials, and exfiltrates this data to a concealed Discord webhook. The malicious payload activates only on real Windows developer environments, avoiding CI and audit contexts. The 2FA functionality is a cover story for this credential-stealing malware.