Skip to content
supplychainattack.orgSupply chain attack incident catalog
resolvedcritical

Malicious code in emoji-prints-fancy (npm)

The npm package emoji-prints-fancy contained malicious code that executed a concealed shell command on installation. The package used AES-256-CBC encryption with hardcoded credentials to obfuscate the payload, which was triggered at module load time via a top-level _warmConfigCache() call.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any system that installed and required/imported the malicious emoji-prints-fancy package
Ecosystems
Attack vectors
Affected entities
  • emoji-prints-fancynpm package

The npm package emoji-prints-fancy was distributed with embedded malicious code designed to execute arbitrary shell commands on any system that installed and imported the package. The package advertised itself as a colorized logger but contained obfuscated payload logic.\n\nThe attack mechanism involved AES-256-CBC decryption of hardcoded ciphertext using a hardcoded passphrase, salt, and IV (with pbkdf2Sync using sha1 and 100,000 iterations). The decrypted plaintext was then passed to child_process.spawn with shell execution enabled (shell: true) and output suppressed (stdio: 'ignore').\n\nThe malicious code path was invoked automatically at module load time through a _warmConfigCache() call, ensuring execution occurred silently whenever the package was required or imported. Multiple decoy helper functions (_checkResources, _registerToken, _semverCompare, _emitEvent, _poolBucket) were included to obscure the actual payload and complicate static analysis.\n\nThe incident was identified and credited to the OpenSSF's malicious-packages repository (MAL-2026-14298).

Indicators of compromise

Packages
  • emoji-prints-fancy

Remediation

  • Immediately uninstall emoji-prints-fancy from all systems
  • Audit all systems where emoji-prints-fancy was installed for signs of compromise or unauthorized command execution
  • Review system logs and process execution history for suspicious activity during the installation period
  • Consider the affected systems as potentially compromised and perform full security assessment
  • Use npm audit to identify any other potentially malicious packages in your dependency tree
  • Implement package verification and scanning in your supply chain to detect obfuscated or encrypted payloads

Sources

  1. GitHub Advisory GHSA-wrfh-x7rw-9673 · GitHub Advisory Database

Cite this entry

"Malicious code in emoji-prints-fancy (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 19, 2026; last updated August 19, 2026. https://supplychainattack.org/incident/malicious-code-in-emoji-prints-fancy-npm-zjce2h

Suggest a correction

Found an error or have a newer source? Corrections to factual errors take priority over new entries.

  1. containedcritical

    Malicious code in testingsmthb1g (npm)

    The npm package testingsmthb1g contains malicious code in its postinstall script that acts as an install-time dropper, downloading and executing a Windows binary payload and exfiltrating platform information. The attack includes sandbox escape capabilities for WSL/virtualized Linux environments.

    npmCompromised package
  2. resolvedcritical

    Malicious code in mutex-core (npm)

    The npm package mutex-core, published under a name resembling the popular async-mutex library, contained malicious code including a staged loader that decrypts and executes hidden payloads. The package included obfuscated code that conditionally triggers AES-256-GCM decryption and execution of encrypted binary content when specific conditions are met.

    npmCompromised package
  3. containedcritical

    Malicious code in tyepescript-cli (npm)

    tyepescript-cli, a typosquat of the legitimate typescript package on npm, contains malicious postinstall code that downloads and executes a Windows binary (main.exe) and beacons to an attacker-controlled server. The package uses XOR obfuscation to hide URLs, commands, and IP addresses, with special logic to target both Windows and WSL environments.

    npmTyposquattingCompromised package
  4. containedcritical

    Malicious code in commandor-cli (npm)

    commandor-cli@1.0.0 on npm contains malicious postinstall script that downloads and executes a binary from an attacker-controlled GitHub repository. The script also beacons installation metadata to a command-and-control server and includes a PowerShell bridge to extend execution to Windows hosts on WSL systems.

    npmCompromised packageMalicious commit