{"id":"CVE-2026-57494","aliases":["CVE-2026-57494","GHSA-hjwc-26pj-v3pm"],"related":[],"kind":"vulnerability","state":"published","title":"AgenticMail: Cross-agent task authorization bypass in AgenticMail API","summary":"AgenticMail gives AI agents real email addresses and phone numbers. In @agenticmail/api prior to version 0.9.64, a low-privileged authenticated AgenticMail agent can enumerate another agent's pending/claimed tasks by supplying the target agent name to `GET /api/agenticmail/tasks/pending?assignee=<name>`. The returned task objects include the task IDs and payloads. The same task IDs can then be used with the capability-style task mutation endpoints (`/tasks/:id/claim`, `/tasks/:id/result`, `/tasks/:id/complete`, `/tasks/:id/fail`) to claim, complete, or fail tasks assigned to a different agent. Because ordinary authenticated agents can discover agent names through `GET /api/agenticmail/accounts/directory`, the task ID effectively stops being a secret capability. This turns the intended capability model into a cross-agent authorization bypass. Version 0.9.64 contains a fix.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"AgenticMail gives AI agents real email addresses and phone numbers. In @agenticmail/api prior to version 0.9.64, a low-privileged authenticated AgenticMail agent can enumerate another agent's pending/claimed tasks by supplying the target agent name to `GET /api/agenticmail/tasks/pending?assignee=<name>`. The returned task objects include the task IDs and payloads. The same task IDs can then be used with the capability-style task mutation endpoints (`/tasks/:id/claim`, `/tasks/:id/result`, `/tasks/:id/complete`, `/tasks/:id/fail`) to claim, complete, or fail tasks assigned to a different agent. Because ordinary authenticated agents can discover agent names through `GET /api/agenticmail/accounts/directory`, the task ID effectively stops being a secret capability. This turns the intended capability model into a cross-agent authorization bypass. Version 0.9.64 contains a fix.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nA low-privileged authenticated AgenticMail agent can enumerate another agent's pending/claimed tasks by supplying the target agent name to `GET /api/agenticmail/tasks/pending?assignee=<name>`. The returned task objects include the task IDs and payloads. The same task IDs can then be used with the capability-style task mutation endpoints (`/tasks/:id/claim`, `/tasks/:id/result`, `/tasks/:id/complete`, `/tasks/:id/fail`) to claim, complete, or fail tasks assigned to a different agent.\n\nBecause ordinary authenticated agents can discover agent names through `GET /api/agenticmail/accounts/directory`, the task ID effectively stops being a secret capability. This turns the intended capability model into a cross-agent authorization bypass.\n\n## Affected component\n\nPackage: `@agenticmail/api`\nObserved version: `0.9.62`\nRepository: `agenticmail/agenticmail`\n\nRelevant code paths:\n\n- `packages/api/src/app.ts`: `createAuthMiddleware(...)` is mounted before `createAccountRoutes(...)` and `createTaskRoutes(...)`, so these routes are reachable by any valid bearer token.\n- `packages/api/src/routes/accounts.ts`: `GET /accounts/directory` is available to any authenticated user and returns agent names.\n- `packages/api/src/routes/tasks.ts`: `GET /tasks/pending?assignee=name` resolves arbitrary agent names and returns that agent's pending/claimed tasks.\n- `packages/api/src/routes/tasks.ts`: `/tasks/:id/claim`, `/tasks/:id/result`, `/tasks/:id/complete`, `/tasks/:id/fail`, and `/tasks/:id` do not check whether the authenticated caller is the task assignee, assigner, or otherwise authorized for the task.\n\n## Impact\n\nAn attacker only needs a valid agent API key. They can:\n\n1. List agent names using `/accounts/directory`.\n2. Query another agent's task queue using `/tasks/pending?assignee=<victimName>`.\n3. Read sensitive task payloads intended for the victim agent.\n4. Use the disclosed task ID to complete/fail/claim the victim's task or submit attacker-controlled results.\n\n## Local reproduction\n\nI reproduced this locally with a focused Vitest test mounted directly on `createTaskRoutes`. The test creates two agents, Alice and Bob, and one pending task assigned to Bob. Alice authenticates with her own agent key and performs the following sequence:\n\n1. `GET /api/agenticmail/tasks/pending?assignee=Bob` with `Authorization: Bearer ak_alice`.\n2. The response is HTTP 200 and includes Bob's task ID and payload: `task-for-bob`, `{ \"task\": \"secret task intended for Bob\" }`.\n3. Alice then sends `POST /api/agenticmail/tasks/task-for-bob/complete` with her own bearer token and an attacker-controlled result.\n4. The task status becomes `completed` and the stored result is controlled by Alice.\n\nThe local verification command was:\n\n```bash\nnpm run test --workspace=@agenticmail/api -- task-routes-authz.test.ts\n```\n\nResult:\n\n```text\nPASS src/__tests__/task-routes-authz.test.ts (1 test)\n```\n\n## Expected behavior\n\nTask listing and task mutation endpoints should enforce an authorization relationship between the authenticated caller and the task. For example:\n\n- `GET /tasks/pending?assignee=<name>` should either be restricted to the current agent, master/admin callers, or an explicit delegated relationship.\n- `/tasks/:id/claim`, `/tasks/:id/result`, `/tasks/:id/complete`, `/tasks/:id/fail`, and `/tasks/:id` should verify that the caller is the assignee, assigner, master/admin, or otherwise explicitly authorized.\n- If capability-based task IDs are retained, the API should not expose those IDs to unrelated agents through the assignee-name listing path.\n\n## Credit\n\nPlease credit the finder as: Yaohui Wang","format":"markdown","source":"ghsa"},{"lang":"es","text":"AgenticMail proporciona a los agentes de IA direcciones de correo electrónico y números de teléfono reales. En @agenticmail/api, anterior a la versión 0.9.64, un agente de AgenticMail autenticado con bajos privilegios puede enumerar las tareas pendientes/reclamadas de otro agente al proporcionar el nombre del agente objetivo a GET /api/agenticmail/tasks/pending?assignee=[name]. Los objetos de tarea devueltos incluyen los ID de tarea y las cargas útiles. Los mismos ID de tarea pueden luego ser utilizados con los puntos finales de mutación de tareas de estilo de capacidad (/tasks/:id/claim, /tasks/:id/result, /tasks/:id/complete, /tasks/:id/fail) para reclamar, completar o fallar tareas asignadas a un agente diferente. Debido a que los agentes autenticados ordinarios pueden descubrir nombres de agentes a través de GET /api/agenticmail/accounts/directory, el ID de tarea deja de ser efectivamente una capacidad secreta. Esto convierte el modelo de capacidad previsto en una omisión de autorización entre agentes. La versión 0.9.64 contiene una corrección.","source":"nvd"}],"published":"2026-06-18T17:20:55.000Z","modified":"2026-10-24T20:10:00.137Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":7.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"}],"cwes":["CWE-639","CWE-862"],"affected":[{"ranges":[{"version":"< 0.9.64","status":"affected"}],"vendor":"agenticmail","product":"@agenticmail/api","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.9.64"}],"ecosystem":"npm","package":"@agenticmail/api","purl":"pkg:npm/%40agenticmail/api","source":"ghsa"}],"references":[{"url":"https://github.com/agenticmail/agenticmail/security/advisories/GHSA-hjwc-26pj-v3pm","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/agenticmail/agenticmail","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-07-21T13:13:34.696Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-57494","url":"https://www.cve.org/CVERecord?id=CVE-2026-57494","licence":"CVE Terms of Use","modified":"2026-07-21T14:56:03.184Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hjwc-26pj-v3pm","url":"https://github.com/advisories/GHSA-hjwc-26pj-v3pm","licence":"CC-BY-4.0","modified":"2026-07-20T22:26:45.921Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-57494","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-57494","licence":"Public domain","modified":"2026-10-24T20:10:00.137Z"}],"updatedAt":"2026-11-25T22:59:29.294Z","epss":{"score":0.00273,"percentile":0.21081,"date":"2026-12-01T12:00:22.000Z"}}