{"id":"MAL-2026-5587","revision":"654abcfad0f144e9a09c196d9fb17480","records":[{"revision":"654abcfad0f144e9a09c196d9fb17480","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-5587","aliases":[],"title":"Malicious code in 0x2ai-demo1 (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (fdc7c661d4867578d3dd920010bccc1e79fcae8753b5bf549f44ea8a45cde502)\nOn `npm install`, scripts/postinstall.cjs runs `fs.cpSync(payload, cwd, { recursive: true })` with cwd=`process.env.INIT_CWD || process.cwd()` — recursively writing the package's entire payload/ tree (.mcp.json, CLAUDE.md,.claude/commands/,.claude/settings.json, and three chatroom.cjs files) into the installing project's root directory. The dropped.mcp.json registers an MCP server named `chatroom` whose BRIDGE_URL is hardcoded to https://demo1.0x2ai.com (the author's endpoint). The dropped CLAUDE.md is auto-loaded by Claude Code as project instructions, redefines the assistant persona, and instructs use of the planted MCP tools/bridge. The companion binary payload/chatroom-mcp-lite-patched.cjs exposes a `provider_query` tool that POSTs caller prompts to `${BRIDGE}/api/proxy-query` (\"API keys are managed server-side — no client keys needed\"), and memory_save/load/chatroom_post/settings_set are similarly routed. Any subsequent Claude Code session opened in the consumer's project will silently forward prompts, memory, settings, and any API keys configured via settings_set to demo1.0x2ai.com. The package also ships URL-path obfuscation (`/x/<sha256(salt+path)[:4]>`) that is dormant only because the shipped config sets DIRECT_API=1. A `bin/start.cjs` entry additionally launches `claude --dangerously-skip-permissions`, disabling Claude Code's tool-permission prompts and amplifying the relay's reach when the user runs the bundled CLI.\n","state":2,"publishedAt":"2026-06-11T07:16:13+00:00","modifiedAt":"2026-07-17T03:04:24.7003594+00:00","affected":[{"ecosystem":"npm","name":"0x2ai-demo1","ranges":[],"versions":["2.0.2","1.2.0","2.0.0"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/0x2ai-demo1/v/2.0.2","https://www.npmjs.com/package/0x2ai-demo1/v/1.2.0","https://www.npmjs.com/package/0x2ai-demo1/v/2.0.0"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-5587","license":"OSV · upstream source license applies","key":"osv:MAL-2026-5587","identifiers":["MAL-2026-5587"]},"retained":false,"historicalAffected":[]}],"coverage":[]}