Malicious code in hex-encode-utils (npm)
The npm package hex-encode-utils versions 1.0.0 through 1.0.5 contains malicious code that executes during installation. It fetches an encrypted payload from hardcoded Cloudflare Workers hosts with TLS verification disabled, decrypts it using a hardcoded key, writes it to a local Python file, and executes it in a detached process. The package also sends host information to a Telegram bot. The malicious behavior is disguised as a compatibility shim and includes sandbox evasion checks to avoid detection in CI or container environments.
AI Analysis
Technical Summary
The hex-encode-utils npm package (versions 1.0.0 to 1.0.5) includes a postinstall script (scripts/compat.js) that downloads an AES-256-GCM encrypted payload from two hardcoded Cloudflare Workers domains with TLS verification disabled. It decrypts this payload using a hardcoded key derived from a decoy string, writes the plaintext to a Python script in the user's cache directory, and executes it in a detached Python process. Prior to payload execution, the script sends a POST request containing the installer's hostname, username, platform, Node version, and package version formatted as an HTML Telegram message to a Telegram bot. Execution is gated by sandbox evasion checks that abort in CI or container environments and require the presence of typical developer directories. The package's legitimate functionality (hex encoding/decoding) does not justify network I/O, encrypted payload fetching, or host reconnaissance, indicating malicious intent.
Potential Impact
This malicious package can execute arbitrary Python code on the host system during installation, potentially leading to unauthorized code execution and data exfiltration. The beaconing to a Telegram bot with detailed host information reveals reconnaissance activity that could facilitate further targeted attacks. The sandbox evasion techniques reduce the likelihood of detection in automated environments, increasing risk to developer workstations.
Mitigation Recommendations
No official patch or remediation is currently documented for this package. Users should immediately avoid installing hex-encode-utils versions 1.0.0 through 1.0.5. Remove any installations of these versions and audit affected systems for unauthorized Python processes and network communications to the specified Cloudflare Workers domains and Telegram bot. Consider blocking network access to the identified malicious hosts. Monitor for suspicious postinstall scripts in npm packages and prefer verified packages from trusted sources.
Malicious code in hex-encode-utils (npm)
Description
The npm package hex-encode-utils versions 1.0.0 through 1.0.5 contains malicious code that executes during installation. It fetches an encrypted payload from hardcoded Cloudflare Workers hosts with TLS verification disabled, decrypts it using a hardcoded key, writes it to a local Python file, and executes it in a detached process. The package also sends host information to a Telegram bot. The malicious behavior is disguised as a compatibility shim and includes sandbox evasion checks to avoid detection in CI or container environments.
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 hex-encode-utils npm package (versions 1.0.0 to 1.0.5) includes a postinstall script (scripts/compat.js) that downloads an AES-256-GCM encrypted payload from two hardcoded Cloudflare Workers domains with TLS verification disabled. It decrypts this payload using a hardcoded key derived from a decoy string, writes the plaintext to a Python script in the user's cache directory, and executes it in a detached Python process. Prior to payload execution, the script sends a POST request containing the installer's hostname, username, platform, Node version, and package version formatted as an HTML Telegram message to a Telegram bot. Execution is gated by sandbox evasion checks that abort in CI or container environments and require the presence of typical developer directories. The package's legitimate functionality (hex encoding/decoding) does not justify network I/O, encrypted payload fetching, or host reconnaissance, indicating malicious intent.
Potential Impact
This malicious package can execute arbitrary Python code on the host system during installation, potentially leading to unauthorized code execution and data exfiltration. The beaconing to a Telegram bot with detailed host information reveals reconnaissance activity that could facilitate further targeted attacks. The sandbox evasion techniques reduce the likelihood of detection in automated environments, increasing risk to developer workstations.
Mitigation Recommendations
No official patch or remediation is currently documented for this package. Users should immediately avoid installing hex-encode-utils versions 1.0.0 through 1.0.5. Remove any installations of these versions and audit affected systems for unauthorized Python processes and network communications to the specified Cloudflare Workers domains and Telegram bot. Consider blocking network access to the identified malicious hosts. Monitor for suspicious postinstall scripts in npm packages and prefer verified packages from trusted sources.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13695
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a79f0d3bf8831d539f6103e
Added to database: 08/10/2026, 15:40:03 UTC
Last enriched: 08/10/2026, 15:55:33 UTC
Last updated: 08/11/2026, 02:09:30 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.
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.