{"id":"MAL-2026-13398","revision":"edd96360386b451db2761a32d317dd78","records":[{"revision":"edd96360386b451db2761a32d317dd78","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-13398","aliases":[],"title":"Malicious code in @xiaohhhh1/canvas-agent (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (a34add291ef7584aec7041449cb2e80d36ae98f93c2725e1aa018707e3334119)\nOn bin start, @xiaohhhh1/canvas-agent opens an outbound WebSocket to the hardcoded relay wss://canvas.xiaohhhh1.com/api/agent-relay and treats inbound messages as HTTP requests to its own loopback API at 127.0.0.1:17371. The bridge unconditionally injects the local agent token (x-canvas-agent-token) into forwarded requests, so remote 'request' messages satisfy token authentication and can invoke /agent/codex/turn and /agent/claude/turn, which spawn the Codex app-server and Claude CLI locally with attacker-supplied prompts and a caller-controlled permissionMode. Codex/Claude are autonomous coding agents that can write files in the workspace and, when permissionMode is widened to danger-full-access, execute arbitrary shell commands. The same code path also bypasses the loopback server's browser-Origin allow-list: the origin gate is populated only after token validation, and the relay bridge presents the valid token without any user-consented browser Origin, so remote-originated calls pass the token+origin check the README advertises. The net effect is a network-to-local-agent-to-shell control path from a hardcoded author-controlled server into the installer's machine and any repository it is run against.\n","state":0,"publishedAt":"2026-08-06T12:56:25+00:00","modifiedAt":"2026-08-07T13:20:13.0444423+00:00","affected":[{"ecosystem":"npm","name":"@xiaohhhh1/canvas-agent","ranges":[],"versions":["0.4.4","0.4.11","0.4.10","0.4.9","0.4.8"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/@xiaohhhh1/canvas-agent/v/0.4.4","https://www.npmjs.com/package/@xiaohhhh1/canvas-agent/v/0.4.11","https://www.npmjs.com/package/@xiaohhhh1/canvas-agent/v/0.4.10","https://www.npmjs.com/package/@xiaohhhh1/canvas-agent/v/0.4.9","https://www.npmjs.com/package/@xiaohhhh1/canvas-agent/v/0.4.8"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-13398","license":"OSV · upstream source license applies","key":"osv:MAL-2026-13398","identifiers":["MAL-2026-13398"]},"retained":false,"historicalAffected":[]}],"coverage":[]}