제출 #862628: cosmicstack-labs mercury-agent 1.1.12 Improper Authorization (CWE-285)정보

제목cosmicstack-labs mercury-agent 1.1.12 Improper Authorization (CWE-285)
설명# Technical Details An Improper Authorization vulnerability exists in Mercury's sub-agent execution path. The `delegate_task` tool accepts an `allowedTools` array (e.g., `['read_file']`) and forwards it into sub-agent creation, creating the expectation of a narrowed capability set. However, at execution time in `src/core/sub-agent.ts`, `SubAgent.run()` always passes the full registry returned by `this.capabilities.getTools()` into the AI SDK loop, ignoring the `allowedTools` restriction. The registry includes orchestration tools (`list_agents`, `stop_agent`) whenever a supervisor exists. Additionally, `stop_agent` in `src/capabilities/subagents/stop-agent.ts` halts any target via `supervisor.halt(agentId)` without checking ownership or allowed-tool constraints. # Vulnerable Code File: src/core/sub-agent.ts (lines 167-173) Method: SubAgent.run() Why: The child execution loop always receives the full `capabilities.getTools()` registry, ignoring the declared `allowedTools` restriction. File: src/capabilities/registry.ts (lines 241-245) Method: CapabilityRegistry constructor Why: Registry exposes `delegate_task`, `list_agents`, and `stop_agent` whenever a supervisor is present, making orchestration tools available to restricted children. File: src/capabilities/subagents/stop-agent.ts (lines 13-27) Method: createStopAgentTool() Why: `stop_agent` halts the requested target via `supervisor.halt(agentId)` without checking whether the caller owns or is allowed to control that target agent. # Reproduction 1. Deploy Mercury with sub-agent delegation enabled. 2. Create a restricted child sub-agent with `allowedTools=['read_file']`. 3. Observe the child still receives `list_agents` and `stop_agent` in its tool registry. 4. The child uses `list_agents` to identify a sibling, then halts it via `stop_agent`. 5. Confirm the control case (benign child) performs only `read_file` without halting siblings. # Impact - Authorization and privilege-scope bypass in delegated sub-agent orchestration. - Restricted child agents can enumerate and halt sibling sub-agents. - Invalidates the security assumption that `allowedTools` meaningfully constrains delegated workers.
원천⚠️ https://github.com/cosmicstack-labs/mercury-agent/issues/74
사용자
 ChenMarry (UID 99089)
제출2026. 06. 18. AM 09:37 (2 개월 ago)
모더레이션2026. 08. 05. PM 09:42 (2 months later)
상태수락
VulDB 항목386381 [cosmicstack-labs mercury-agent 까지 1.1.12 delegate_task Tool src/core/sub-agent.ts SubAgent.run 권한 상승]
포인트들20

Interested in the pricing of exploits?

See the underground prices here!