MAL-2026-6585: Malicious code in stake-math (npm)
The npm package 'stake-math' versions 3.5.2, 3.5.3, and 3.5.4 contains malicious code that executes arbitrary attacker-controlled code during installation. Its postinstall script downloads and runs code from an unrelated, hardcoded external host without integrity checks, enabling remote code execution on the installer's machine. The package exhibits identity divergence and brand impersonation to deceive users.
AI Analysis
Technical Summary
The 'stake-math' npm package (versions 3.5.2, 3.5.3, and 3.5.4) includes a postinstall hook that fetches a JSON configuration from a hardcoded, non-publisher-controlled domain (https://www.log-prettier.store). This configuration provides a URL to a tarball which the script downloads, extracts, and installs nested dependencies from, then executes a JavaScript file ('peer-math.js') within the installer's Node.js process. There are no version pins, hashes, or signature verifications for the downloaded content, allowing arbitrary code execution. The package also misrepresents its identity by naming inconsistencies and homepage URLs unrelated to the legitimate publisher, indicating brand impersonation to trick users into installing malicious code.
Potential Impact
Installing affected versions of 'stake-math' results in arbitrary code execution on the installer's machine, potentially allowing attackers to run any code with the installer's privileges. This compromises system integrity and security.
Mitigation Recommendations
No official patch or fix is currently documented. Users should avoid installing versions 3.5.2, 3.5.3, and 3.5.4 of 'stake-math'. Verify package authenticity before installation and prefer packages from trusted sources. Monitor vendor advisories for updates or official remediation.
MAL-2026-6585: Malicious code in stake-math (npm)
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 code during installation. Its postinstall script downloads and runs code from an unrelated, hardcoded external host without integrity checks, enabling remote code execution on the installer's machine. The package exhibits identity divergence and brand impersonation to deceive users.
Affected software
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
Technical Analysis
The 'stake-math' npm package (versions 3.5.2, 3.5.3, and 3.5.4) includes a postinstall hook that fetches a JSON configuration from a hardcoded, non-publisher-controlled domain (https://www.log-prettier.store). This configuration provides a URL to a tarball which the script downloads, extracts, and installs nested dependencies from, then executes a JavaScript file ('peer-math.js') within the installer's Node.js process. There are no version pins, hashes, or signature verifications for the downloaded content, allowing arbitrary code execution. The package also misrepresents its identity by naming inconsistencies and homepage URLs unrelated to the legitimate publisher, indicating brand impersonation to trick users into installing malicious code.
Potential Impact
Installing affected versions of 'stake-math' results in arbitrary code execution on the installer's machine, potentially allowing attackers to run any code with the installer's privileges. This compromises system integrity and security.
Mitigation Recommendations
No official patch or fix is currently documented. Users should avoid installing versions 3.5.2, 3.5.3, and 3.5.4 of 'stake-math'. Verify package authenticity before installation and prefer packages from trusted sources. Monitor vendor advisories for updates or official remediation.
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: 06/29/2026, 22:35:24 UTC
Last updated: 06/30/2026, 00:53:32 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.