Skip to main content

Malicious code in secretkey-2fa (npm)

0
Critical
Published: 08/25/2026 (08/25/2026, 08:28:44 UTC)
Source: GCVE Database
Product: secretkey-2fa

Description

The npm package secretkey-2fa (versions 1.0.0 and 1.0.1) contains malicious code that executes during installation and usage. It steals Minecraft launcher credentials, Discord tokens, and Chromium-based browser tokens by decrypting stored credentials and exfiltrates them to an attacker-controlled webhook. Additionally, it installs a malicious Minecraft mod JAR to persist the payload on subsequent game launches.

Affected software

npmghsa
secretkey-2fa
Affected versions
=1.0.0=1.0.1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/10/2026, 19:17:39 UTC

Technical Analysis

The secretkey-2fa npm package masquerades as a zero-dependency TOTP library but includes a postinstall hook and a validateSecret API that trigger a credential stealer. The malicious script reads various Minecraft launcher credential files, extracts access and refresh tokens, and exchanges refresh tokens for fresh Minecraft session tokens. It also enumerates Discord and Chromium-family browser local storage files, decrypts encrypted tokens using Windows DPAPI, validates tokens via the Discord API, and sends valid tokens to a hardcoded attacker webhook. Furthermore, it installs a malicious JAR file into Minecraft mods directories to maintain persistence. The malicious payload is obfuscated using XOR encoding and is triggered both during installation and runtime library use.

Potential Impact

Compromise of user credentials including Minecraft launcher accounts, Discord tokens, and Chromium-based browser tokens. This can lead to unauthorized access to user accounts, potential account takeover, and further malicious activity using stolen credentials. The persistence mechanism via Minecraft mods increases the risk of continued compromise.

Mitigation Recommendations

No official patch or remediation is currently documented. Users should avoid installing or using secretkey-2fa versions 1.0.0 and 1.0.1. Employing npm install with the --ignore-scripts flag can prevent the postinstall hook from executing, but the validateSecret API still triggers the stealer, so complete avoidance of this package is recommended. Monitor for updates from the package maintainer or npm advisories for any official fixes.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-14485
Osv Schema Version
1.7.4
Ecosystems
["npm"]

Threat ID: 6a8d9ae6acd9273b493e16f1

Added to database: 08/25/2026, 13:38:46 UTC

Last enriched: 09/10/2026, 19:17:39 UTC

Last updated: 10/04/2026, 08:19:21 UTC

Views: 73

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses