T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/agent_network/coordinator.py:94- Finding
Unauthenticated Agent Impersonation and Administrative Operations
- Content
View full analysis
bool: """Register an Agent with the coordinator.""" agent = AgentManager.get_by_id(agent_id) if not agent: print(f"[Coordinator] Agent {agent_id} does not exist") return False AgentManager.go_online(agent_id) session = AgentSession(agent=agent, handler=message_handler) self.sessions[agent_id] = session if message_handler: if agent_id not in self.message_handlers: self.message_handlers[agent_id] = [] self.message_handlers[agent_id].append(message_handler) print(f"[Coordinator] Agent '{agent.name}' registered and online") self.broadcast_system_message(f"Agent '{agent.name}' is online") return True ``` The CLI likewise selects an identity solely by list position: ```python idx = int(choice) - 1 if 0 <= idx < len(agents): self.current_agent = agents[idx] AgentManager.go_online(self.current_agent.id) ``` ### Technical Analysis The system treats a caller-supplied `agent_id` as proof of identity. There is no credential, session token, API key, cryptographic signature, or authenticated principal associated with the requested agent. Registration immediately creates an active session and marks that identity online. The exported `AgentManager` methods also accept arbitrary agent IDs for status changes and deletion. Consequently, possession or discovery of an integer ID is sufficient to act as another agent. Because messages, tasks, and votes rely on caller-supplied agent IDs, this defect compromises attribution throughout the application rather than affecting ...[truncated 817 chars]- Remediation
View remediation
