MAL-2026-6484: Malicious code in random-string-64 (npm)
The npm package random-string-64 versions 1.0.0 and 1.0.1 contains malicious code embedded as an encrypted payload that is decrypted and executed via eval on developer machines. The package uses obfuscation techniques to hide the eval call and includes environment checks to evade automated analysis. When the exported getUniqueID(64) function is invoked on a real developer workstation, attacker-controlled code runs with the privileges of the calling process, representing a supply-chain attack risk.
AI Analysis
Technical Summary
The random-string-64 npm package (versions 1.0.0 and 1.0.1) advertises a simple random string generator but contains a hardcoded AES-256-CBC encrypted JavaScript payload. This payload is decrypted using a SHA-256 derived key and executed via a dynamically reconstructed eval function. The package performs environment detection to avoid execution in CI, npm bot, container, or virtual machine environments, only running the malicious code on developer machines. This behavior allows execution of attacker-controlled code with the privileges of the importing process, constituting a supply-chain attack vector. No official patch or remediation is indicated in the provided data.
Potential Impact
Any developer machine that imports random-string-64 and calls its getUniqueID(64) function executes attacker-controlled code with the same privileges as the calling process. This can lead to arbitrary code execution, potentially compromising the developer environment and any systems accessible from it. The obfuscation and anti-analysis techniques increase the risk of undetected compromise in development workflows.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately avoid using random-string-64 versions 1.0.0 and 1.0.1. Remove the package from projects and replace it with a trusted alternative. Monitor for any unusual activity on developer machines that used this package. Check vendor advisories or trusted security sources for updates or fixes.
MAL-2026-6484: Malicious code in random-string-64 (npm)
Description
The npm package random-string-64 versions 1.0.0 and 1.0.1 contains malicious code embedded as an encrypted payload that is decrypted and executed via eval on developer machines. The package uses obfuscation techniques to hide the eval call and includes environment checks to evade automated analysis. When the exported getUniqueID(64) function is invoked on a real developer workstation, attacker-controlled code runs with the privileges of the calling process, representing a supply-chain attack risk.
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 random-string-64 npm package (versions 1.0.0 and 1.0.1) advertises a simple random string generator but contains a hardcoded AES-256-CBC encrypted JavaScript payload. This payload is decrypted using a SHA-256 derived key and executed via a dynamically reconstructed eval function. The package performs environment detection to avoid execution in CI, npm bot, container, or virtual machine environments, only running the malicious code on developer machines. This behavior allows execution of attacker-controlled code with the privileges of the importing process, constituting a supply-chain attack vector. No official patch or remediation is indicated in the provided data.
Potential Impact
Any developer machine that imports random-string-64 and calls its getUniqueID(64) function executes attacker-controlled code with the same privileges as the calling process. This can lead to arbitrary code execution, potentially compromising the developer environment and any systems accessible from it. The obfuscation and anti-analysis techniques increase the risk of undetected compromise in development workflows.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately avoid using random-string-64 versions 1.0.0 and 1.0.1. Remove the package from projects and replace it with a trusted alternative. Monitor for any unusual activity on developer machines that used this package. Check vendor advisories or trusted security sources for updates or fixes.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6484
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a3ef7de27e9c79719026317
Added to database: 06/26/2026, 22:06:22 UTC
Last enriched: 06/26/2026, 22:41:24 UTC
Last updated: 06/26/2026, 23:41:01 UTC
Views: 3
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.