Skip to main content
MalwarePublished

2fa-secretkey (npm) · Malicious Code

Affects 2fa-secretkeySource GCVE Database

0

Malicious package : remove 2fa-secretkey and rotate any secrets on hosts that installed it.

Data as of 9 Sep 2026, 21:37 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-15547

What to do

Remove 2fa-secretkey 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

ProductAffectedFixed in
npm2fa-secretkeyAffected
  • 1.0.1 – 1.0.7
7 affected builds
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 '2fa-secretkey' contains malicious code that executes automatically upon installation. It runs a hidden payload on Windows systems that collects sensitive credentials, including Windows Credential Manager secrets, Microsoft refresh tokens, JWT access tokens, Minecraft session IDs, and decrypted Chromium browser cookies and stored credentials. This stolen data is exfiltrated to a hardcoded Discord webhook URL unrelated to the package's advertised functionality. The payload includes environment checks to avoid execution in CI environments or non-Windows systems. Multiple specific versions of the package are affected.

References

Community reviews

Loading reviews…