Malicious code in @bananacool467/ui-tools (npm)
The npm package @bananacool467/ui-tools contained malicious code that implements an unauthenticated remote shell backdoor disguised as a UI component library. The package exports a useTerminal hook that spawns an interactive bash/powershell PTY accessible via WebSocket, allowing arbitrary command execution on the server with no authentication or origin checks.
- Disclosed
- Last updated
- Blast radius
- Any application that imports and uses the @bananacool467/ui-tools package, particularly if the useTerminal hook is mounted in server-side code.
- Ecosystems
- Attack vectors
- Affected entities
- @bananacool467/ui-toolsnpm package advertised as UI-components library but containing malicious remote shell functionality
The @bananacool467/ui-tools npm package was distributed with malicious code that contradicts its advertised purpose as a UI-components library (marketed similarly to Material-UI). The package's main export surface includes a useTerminal hook that, when mounted, establishes an unauthenticated WebSocket server on a default path (/terminal-stream) and spawns an interactive bash or powershell PTY process.
The implementation writes bytes received from WebSocket messages directly into the PTY process and streams output back to the socket, with no authentication, origin validation, or handshake tokens. The package ships both the server-side middleware and a matching browser client (exported as Terminal), creating a complete remote shell channel.
Any application that imports this package and mounts the useTerminal hook in server-side code would expose a full unauthenticated interactive shell executing with the server process's privileges and environment. This represents a backdoor delivered under a benign cover story, with the mismatch between marketed functionality (UI kit) and actual capability (network-driven RCE) indicating intentional deception.
The incident was identified by Amazon Inspector and credited to the OpenSSF malicious-packages project.
Indicators of compromise
- Packages
- @bananacool467/ui-tools
Remediation
- Immediately remove @bananacool467/ui-tools from all dependencies and lock files
- Audit all applications that may have installed this package for unauthorized access or command execution
- Review server logs for WebSocket connections to /terminal-stream or similar paths
- Rotate credentials and secrets that may have been exposed through the backdoor
- Verify the integrity of any systems that ran code importing this package
- Use npm audit or similar tools to detect any remaining installations of this malicious package
Sources
- GitHub Advisory GHSA-46qc-4j94-54hf · GitHub Advisory Database
Cite this entry
"Malicious code in @bananacool467/ui-tools (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 6, 2026; last updated August 7, 2026. https://supplychainattack.org/incident/malicious-code-in-bananacool467-ui-tools-npm-1ymub5
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- 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 - 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 - 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 - 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