Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in stake-math (npm)

0
Critical
Published: 06/29/2026 (06/29/2026, 05:33:56 UTC)
Source: GCVE Database
Product: stake-math

Description

The npm package 'stake-math' versions 3.5.2, 3.5.3, and 3.5.4 contains malicious code that executes arbitrary attacker-controlled commands during installation. The package's postinstall script fetches and runs code from an untrusted external source unrelated to the legitimate publisher, leading to full system compromise. The package also impersonates another brand to deceive users. Systems with this package installed should be considered fully compromised, and secrets must be rotated immediately.

Affected software

npmghsa
stake-math
Affected versions
=3.5.2=3.5.3=3.5.4

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: 07/30/2026, 09:20:30 UTC

Technical Analysis

The 'stake-math' npm package in versions 3.5.2, 3.5.3, and 3.5.4 includes a postinstall hook that downloads a JSON configuration from a hardcoded, non-publisher-controlled domain (https://www.log-prettier.store), retrieves a tarball URL, downloads and extracts it, runs a nested npm install, and executes a JavaScript file ('peer-math.js') within the installer's Node.js process. This process allows arbitrary code execution controlled by an attacker. The package exhibits identity divergence, with mismatched package name and README branding, and a homepage pointing to the malicious domain, indicating brand impersonation to lure victims. Installing this package version results in full compromise of the host machine.

Potential Impact

Installing affected versions of 'stake-math' results in arbitrary code execution with the installer's privileges, effectively giving attackers full control over the compromised system. This can lead to theft of secrets, keys, and other sensitive data. The compromise is severe enough that all secrets on the affected machine should be considered exposed and rotated immediately. Removal of the package alone does not guarantee eradication of all malicious artifacts or backdoors.

Mitigation Recommendations

No official patch or fix is currently available. Users should immediately remove versions 3.5.2, 3.5.3, and 3.5.4 of the 'stake-math' package from their systems. Because the package executes attacker-controlled code during installation, any system with these versions installed should be treated as fully compromised. All secrets and keys stored on the affected system must be rotated from a separate, trusted environment. Monitor for and investigate any suspicious activity related to this package. Avoid installing packages from untrusted sources and verify package authenticity before installation.

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-6585
Osv Schema Version
1.7.4
Aliases
[]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a42ed6927e9c79719938288

Added to database: 06/29/2026, 22:10:49 UTC

Last enriched: 07/30/2026, 09:20:30 UTC

Last updated: 07/30/2026, 09:20:30 UTC

Views: 39

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