Skip to content
supplychainattack.orgSupply chain attack incident catalog
resolvedcritical

Malicious code in elephant-tusk-runner (npm)

The npm package elephant-tusk-runner contained malicious code that exposed a remote shell and remote code execution surface via an unauthenticated Express + WebSocket server binding to 0.0.0.0:4201 with fully open CORS. Any peer able to reach the port could execute arbitrary commands on the host.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any developer or build machine on a shared or reachable network running the package.
Ecosystems
Attack vectors
Affected entities
  • elephant-tusk-runnernpm package containing malicious code

The npm package elephant-tusk-runner was found to contain malicious code in its server.js file. The package starts an Express + WebSocket server via app.listen(PORT,...) with no host argument, defaulting the bind to 0.0.0.0, with fully open CORS (Access-Control-Allow-Origin: *) and no authentication.\n\nThe server exposes multiple dangerous endpoints: a WebSocket route /terminal-stream and HTTP POST /api/v1/workspace-terminal-command that spawn bash or powershell.exe PTY and pipe network-received bytes directly into the PTY session, giving any peer that can reach port 4201 an interactive shell on the host. Additional endpoints call child_process.exec with attacker-controllable arguments, including git clone, composer install, npm install, PHP execution, and process termination commands, plus a fetch-proxy that forwards arbitrary target URLs.\n\nThe listener is started by npm start and by the tusk/elephant CLI shipped in the package's bin entries. On any developer or build machine on a shared or reachable network, this exposes a full remote-shell and remote-code-execution surface for the duration the tool runs.\n\nThe incident was identified and credited to the OpenSSF malicious-packages repository.

Indicators of compromise

Packages
  • elephant-tusk-runner

Remediation

  • Immediately uninstall elephant-tusk-runner from all systems
  • Audit npm install logs and package-lock.json to identify when the package was installed
  • Scan affected machines for signs of unauthorized access or code execution during the period the package was installed
  • Review network logs for connections to port 4201 on affected machines
  • Rotate credentials and secrets that may have been exposed on affected systems
  • Update npm dependencies to remove any references to elephant-tusk-runner

Sources

  1. GitHub Advisory GHSA-5cwc-j82p-mr9g · GitHub Advisory Database

Cite this entry

"Malicious code in elephant-tusk-runner (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 7, 2026; last updated August 7, 2026. https://supplychainattack.org/incident/malicious-code-in-elephant-tusk-runner-npm-1tk5lr

Suggest a correction

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

  1. resolvedcritical

    Malicious code in autbank-core (npm)

    The npm package autbank-core contained malicious preinstall and postinstall lifecycle hooks that exfiltrated environment variables, credentials, and system information to a hardcoded webhook.site endpoint during installation.

    npmCompromised package
  2. resolvedcritical

    Malicious code in adxaa (npm)

    The npm package adxaa contained obfuscated malicious JavaScript designed to target users of a specific WordPress site. The payload exfiltrates session data, deletes accounts, and hijacks credentials via email overwrite and password reset.

    npmCompromised package
  3. resolvedcritical

    Malicious code in upload-to-gcp (npm)

    upload-to-gcp@3.2.1 (npm) contains malicious code in its postinstall script that exfiltrates host identifiers to an attacker-controlled endpoint. The package masquerades as a Google Cloud Platform utility but performs unauthorized telemetry collection at install time.

    npmCompromised package
  4. resolvedcritical

    Malicious code in akamai-sensor (npm)

    A malicious npm package named akamai-sensor impersonated Akamai's legitimate sensor_data anti-bot SDK. The package contained hidden JavaScript code concealed using invisible Unicode characters and implemented a dynamic command-and-control channel via a Google Calendar dead-drop, enabling arbitrary code execution on installation.

    npmCompromised packageTyposquatting