Skip to main content
MalwarePublished

2fasecretkey (npm) · Malicious Code

Affects 2fasecretkeySource GCVE Database

0

Malicious package : remove 2fasecretkey and rotate any secrets on hosts that installed it.

Data as of 9 Sep 2026, 19:08 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-15548

What to do

Remove 2fasecretkey 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
npm2fasecretkeyAffected
  • =1.1.4
  • =1.1.3
  • =1.1.2
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 '2fasecretkey' versions 1.1.2, 1.1.3, and 1.1.4 contains malicious code that executes during installation. Its postinstall script fetches and executes remote code via an unprotected HTTP request to a hardcoded IP address, running the payload hidden from the user. This behavior is unrelated to the package's advertised function as a TOTP helper and poses a risk of executing arbitrary code on the installing system.

References

Community reviews

Loading reviews…