T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- dashboard.py:518
- Finding
- Unauthenticated Dashboard Exposes Sensitive Workspace and Agent Data<![CDATA[ ## Vulnerability Details **File Location**: `dashboard.py:518-594`, `dashboard.py:722-724`, `dashboard.py:1045` **Vulnerability Type**: Missing authentication, excessive data exposure, wildcard CORS, and network-wide binding **Risk Level**: High ### Vulnerable Code ```python return { "timestamp": now.isoformat(), "gateway_online": _probe_gateway(), "agents": agents, "tasks": tasks, "task_counts": task_counts, "sla_at_risk": sla_at_risk, "hitl_tasks": hitl_tasks, "okrs": okrs_raw if isinstance(okrs_raw, dict) else {}, "velocity": { "daily": velocity_daily, "weekly_summary": velocity_summary, "metrics": velocity_raw.get("metrics", {}) if isinstance(velocity_raw, dict) else {}, }, "budget": budget_raw if isinstance(budget_raw, dict) else {}, "projects": projects, "experiments": experiments, "backlog": backlog, "benchmarks": benchmarks_raw if isinstance(benchmarks_raw, dict) else {}, "knowledge": knowledge_entries, "knowledge_count": len(sk_entries), "memory_lines": memory_lines, "broadcast": broadcast[-2000:], "crons": crons, "dispatcher": dispatcher_raw if isinstance(dispatcher_raw, dict) else {}, "comms": comms, "sprint": sprint_raw if isinstance(sprint_raw, dict) else {}, "alerts": alerts, "cache_age_seconds": round(_slow_cache.age_seconds()), } ``` ```python def send_cors(self): self.send_header("Access-Control-Allow-Origin", "*") self.send_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS") self.send_header("Access-Control-Allow-Headers", "Content-Type") ``` ```python handler = make_handler(workspace, broadcaster) server = ThreadingHTTPServer(("", args.port), handler) ``` ### Technical Analysis The dashboard server binds to all available interfaces by passing an empty ...[truncated 1951 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Bind the dashboard to loopback by default: ```python server = ThreadingHTTPServer(("127.0.0.1", args.port), handler) ``` 2. Require authentication for every API and SSE endpoint. Use a randomly generated bearer token or an authenticated session with secure, `HttpOnly`, and `SameSite` cookies. 3. Apply authorization separately to read-only data, task updates, HITL decisions, and cron administration. 4. Replace wildcard CORS with an explicit trusted origin. If the frontend is served from the same origin, omit CORS entirely. 5. Return only the minimum fields needed by each dashboard view. Do not return complete inboxes, outboxes, dispatcher history, or cron details by default. 6. Add a startup warning and require an explicit option such as `--listen-public` before accepting non-loopback connections. 7. Add access logging, rate limiting, and security tests that verify unauthenticated requests receive `401 Unauthorized` or `403 Forbidden`. ]]>
