Skip to content
supplychainattack.orgSupply chain attack incident catalog
containedcritical

Malicious code in @ghost_debugger/nanocache (npm)

The npm package @ghost_debugger/nanocache contains malicious code that spawns a hidden Windows executable (vendor/nanocache.exe) on require/import, establishing persistent remote control via WebSocket-based agent. The package masquerades as an in-memory LRU+TTL cache but functions as a generic launcher for the bundled binary.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Windows hosts installing or importing the package; potential for persistent remote control
Ecosystems
Attack vectors
Affected entities
  • @ghost_debugger/nanocachenpm package containing malicious Windows executable

The npm package @ghost_debugger/nanocache was found to contain malicious code that executes a bundled 1.1 MB Windows executable (vendor/nanocache.exe) upon package import or require. The executable is launched as a detached background process with hidden window settings and child.unref() to ensure persistence beyond parent process termination.

Analysis of the binary reveals strings consistent with a WebSocket-based remote agent, including /ws/agent, disconnect, update, and exit_code, indicating command-and-control capabilities. The package's README describes vendor/nanocache.exe as a drop-in slot for arbitrary Windows executables, confirming the npm module functions as a generic launcher rather than a legitimate cache library.

Installation or import of this package on Windows systems results in an opaque, hidden native process being launched under a false cache-library cover story, granting a remote party persistent control over the affected machine. The binary is not built from source included in the tarball, indicating intentional obfuscation.

This incident was identified and credited to the OpenSSF malicious-packages repository.

Indicators of compromise

Packages
  • @ghost_debugger/nanocache

Remediation

  • Immediately uninstall @ghost_debugger/nanocache from all systems
  • Audit npm package.json and lock files for any dependency on @ghost_debugger/nanocache
  • On Windows systems where the package was installed, scan for and terminate any nanocache.exe processes
  • Review system logs and network connections for evidence of remote access or command execution
  • Consider full system forensics on affected Windows hosts to detect lateral movement or data exfiltration
  • Update npm dependencies to remove any transitive dependencies on this package
  • Monitor for similar malicious packages using the same obfuscation patterns

Sources

  1. GitHub Advisory GHSA-q5p2-m4qf-x2cr · GitHub Advisory Database

Cite this entry

"Malicious code in @ghost_debugger/nanocache (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 14, 2026; last updated August 14, 2026. https://supplychainattack.org/incident/malicious-code-in-ghost-debugger-nanocache-npm-pis4l6

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 3-buildsight-web (npm)

    The npm package 3-buildsight-web contains malicious code that fetches and executes arbitrary JavaScript from a remote Bitbucket URL on module load, granting full page privileges to an unverified third party.

    npmCompromised package
  2. resolvedcritical

    Malicious code in @usaa-grp-personal-profile/personal-profile-common (npm)

    Malicious package @usaa-grp-personal-profile/personal-profile-common version 999.0.0 published to public npm as a dependency-confusion attack targeting an organization's internal registry. The package contains preinstall and postinstall hooks that exfiltrate hostname, username, and working directory to an attacker-controlled OAST endpoint on every install.

    npmDependency confusionCompromised package
  3. resolvedcritical

    Malicious code in create-coin (npm)

    create-coin@20.1.1 on npm contained malicious postinstall code that collected sensitive environment variables, credentials, and host reconnaissance data. The package impersonated an esbuild platform build and exfiltrated data to a hardcoded endpoint.

    npmCompromised packageTyposquatting
  4. resolvedcritical

    Malicious code in @syncraft-labs/vue (npm)

    The npm package @syncraft-labs/vue version 0.4.1 contained malicious obfuscated code in its ESM build that implements a blockchain-hosted C2 dropper (EtherHiding pattern), enabling remote code execution on any consumer importing the package.

    npmCompromised package