{"id":"MAL-2026-13416","kind":"package","aliases":["MAL-2026-13416"],"related":[],"title":"Malicious code in @bananacool467/ui-tools (npm)","description":"---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (b8497bfe55fd379ac7c87c73e99e8c532193a17516996d9ae6cfb856b84a052a)\nThe package advertises itself as a UI-components library (README compares it to MUI), but its main export surface includes `useTerminal`, a server-side middleware that stands up a WebSocketServer (default path `/terminal-stream`) and, on every incoming WS message, spawns an interactive bash/powershell PTY via `pty.spawn` with the server process's own environment (`{...process.env, TERM: 'xterm-256color'}`) and cwd set to the user's home directory. Bytes received from the WebSocket are written directly into the PTY (`session.ptyProcess.write(parsed.data)`, with a fallback that writes raw message bytes), and PTY output is streamed back to the socket. No authentication, origin check, or handshake token gates the connection. `dist/terminal.js` ships the matching browser client (exported as `Terminal`) that connects to that same WebSocket and pipes keystrokes as `{type:'input', data:...}`, so the package ships both ends of a remote-shell channel. A consumer who mounts the exported hook — expecting a UI helper — exposes a full unauthenticated interactive shell on their server, executing as the server process. The mismatch between the marketed purpose (UI kit) and the shipped capability (network-driven RCE) is the shape of a backdoor delivered under a benign cover story.","summary":null,"severity":"critical","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"@bananacool467/ui-tools","fixed":[],"affected":"= 0.1.4-beta; = 0.1.0-beta; = 0.1.7-beta; = 0.1.3-beta; = 0.1.1-beta; = 0.1.5-beta; = 0.1.2-beta; = 0.1.6-beta","ecosystem":"npm"}],"ecosystems":["npm"],"tags":["malicious","package"],"not_affected_if":[],"how_to_check":null,"fix":null,"status":"withdrawn","published_at":"2026-08-06T13:54:59+00:00","first_seen_at":"2026-11-02T04:51:15+00:00","triaged_at":"2026-11-02T04:52:17+00:00","updated_at":"2026-11-02T04:52:17+00:00","category":"package","confidence":null,"triage":null,"analyst_status":null,"analyst_note":null,"search":"'-13416':8A,11A '-2026':7A,10A '/terminal-stream':63C '256color':88C 'advertis':31C 'amazon':26C 'amazon-inspector':25C 'authent':129C 'b8497bfe55fd379ac7c87c73e99e8c532193a17516996d9ae6cfb856b84a052a':28C 'back':124C 'backdoor':218C 'bananacool467/ui-tools':4A,12A 'bash/powershell':73C 'benign':222C 'browser':142C 'byte':98C,118C 'capabl':208C 'channel':171C 'check':131C 'client':143C 'code':2A 'compar':40C 'compon':37C 'connect':137C,148C 'consum':173C 'cover':223C 'cwd':90C 'data':159C 'default':61C 'deliv':219C 'detail':17C 'direct':105C 'directori':97C 'dist/terminal.js':138C 'driven':211C 'edit':20C 'end':165C 'environ':83C 'everi':66C 'execut':192C 'expect':179C 'export':47C,144C,177C 'expos':183C 'fallback':113C 'full':185C 'gate':135C 'handshak':133C 'helper':182C 'home':96C 'hook':178C 'includ':49C 'incom':67C 'input':158C 'inspector':27C 'interact':72C,187C 'keystrok':155C 'kit':204C 'librari':38C 'line':23C 'main':46C 'mal':6A,9A 'malici':1A,13B 'market':201C 'match':141C 'messag':69C,117C 'middlewar':55C 'mismatch':198C 'mount':175C 'mui':43C 'network':210C 'network-driven':209C 'npm':5A 'origin':130C 'output':121C 'packag':14B,30C,162C 'parsed.data':110C 'path':62C 'per':15C 'pipe':154C 'process':80C,196C 'process.env':84C 'pti':74C,108C,120C 'pty.spawn':76C 'purpos':202C 'raw':116C 'rce':212C 'readm':39C 'receiv':99C 'remot':169C 'remote-shel':168C 'server':53C,79C,191C,195C 'server-sid':52C 'session.ptyprocess.write':109C 'set':91C 'shape':215C 'shell':170C,188C 'ship':139C,163C,207C 'side':54C 'socket':127C 'sourc':16C,24C 'spawn':70C 'stand':57C 'stori':224C 'stream':123C 'surfac':48C 'term':85C 'termin':146C 'token':134C 'type':157C 'ui':36C,181C,203C 'ui-compon':35C 'unauthent':186C 'user':94C 'usetermin':50C 'via':75C 'websocket':102C,152C 'websocketserv':60C 'write':115C 'written':104C 'ws':68C 'xterm':87C 'xterm-256color':86C","nicknames":[],"mitigations":[],"who_affected":null,"tier":null,"verified":{},"analyst_revisit_at":null,"fix_status":null,"audience":null,"plain_action":null,"pkeys":["uitools"],"ptokens":["bananacool467","tools","ui"],"labels":["critical","malicious","npm","package"],"first_public_at":"2026-08-06T13:54:59+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"osv-malicious","external_id":"MAL-2026-13416","url":"https://osv.dev/vulnerability/MAL-2026-13416","severity":"critical","published_at":"2026-08-06T13:54:59+00:00","modified_at":"2026-11-02T04:15:04+00:00","first_seen_at":"2026-11-02T04:51:15+00:00","fetched_at":"2026-11-02T04:51:15+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}