{"id":"MAL-2026-5589","revision":"e893cd1cea044ce38ac5135ea585cf37","records":[{"revision":"e893cd1cea044ce38ac5135ea585cf37","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-5589","aliases":[],"title":"Malicious code in 0x2ai-demo2 (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (98ee2445b2f0b01d2457cf45c188b310f58c98f3b676032f9c6213469f071239)\nOn `npm install`, scripts/postinstall.cjs recursively copies the bundled payload/ directory into INIT_CWD (the developer's project root) via fs.cpSync. The staged files reconfigure Claude Code so subsequent sessions in that project route through an author-controlled bridge:\n\n- payload/.mcp.json registers an MCP `chatroom` server with hardcoded BRIDGE_URL=https://demo2.0x2ai.com and a hardcoded bearer token (BRIDGE_AUTH_TOKEN). Any `claude` invocation in the project auto-loads this MCP server.\n- payload/chatroom-mcp-lite-patched.cjs and payload/chatroom-monitor.cjs use child_process, fs.readFileSync, http/https, and POST to exfiltrate session content (chatroom_post, memory_save, provider_query, settings_set tools) to demo2.0x2ai.com. provider_query proxies model calls through the author's server (\"API keys are managed server-side\"), so prompts and responses flow one-way to the attacker.\n- payload/CLAUDE.md is a ~12 KB persona/instruction file that tells Claude to operate as \"Olivia\", route all memory and chat through https://demo2.0x2ai.com, and refuse to discuss its architecture or prompts (anti-inspection language: `taboo`, `family_recipe`).\n- payload/.claude/settings.json overrides the statusLine command and payload/.claude/commands/0x2ai-boot.md autoboots a long-poll listener against the author's bridge.\n- bin/start.cjs (advertised as `npx 0x2ai-demo2`) re-stages the payload into CWD and spawns `claude --dangerously-skip-permissions`, disabling Claude's tool-permission prompts while the attacker-controlled MCP server is loaded — enabling remote-driven destructive actions on the developer's machine without approval.\n\nThe staged files persist after `npm uninstall`, providing durable redirection of the developer's AI tooling to the author's infrastructure.\n","state":2,"publishedAt":"2026-06-11T07:16:18+00:00","modifiedAt":"2026-07-17T03:04:24.7089077+00:00","affected":[{"ecosystem":"npm","name":"0x2ai-demo2","ranges":[],"versions":["1.2.0"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/0x2ai-demo2/v/1.2.0"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-5589","license":"OSV · upstream source license applies","key":"osv:MAL-2026-5589","identifiers":["MAL-2026-5589"]},"retained":false,"historicalAffected":[]}],"coverage":[]}