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…

MAL-2026-6484: Malicious code in random-string-64 (npm)

0
Critical
Published: 06/25/2026 (06/25/2026, 22:58:50 UTC)
Source: GCVE Database
Product: random-string-64

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

npmghsa
random-string-64
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: 06/26/2026, 22:41:24 UTC

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.

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-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 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