T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/openwebui_tool.py:62- Finding
Missing Per-User Authorization for Council Blackboard Operations
- Content
View full analysis
Vulnerability Details
File Location:
scripts/openwebui_tool.py, lines 62-68
Additional Affected Operations:scripts/openwebui_tool.py, lines 330-580
Vulnerability Type: Broken object-level authorization
Risk Level: HighVulnerable Code
python def _board(value: str) -> Path: path = Path(value).expanduser().resolve() if path.parent != BOARDS or path.suffix.lower() != ".json": raise ValueError("invalid council board path") if not path.is_file(): raise FileNotFoundError(f"council board not found: {path}") return pathThe resulting path is subsequently trusted by operations such as
read_council:python def read_council( self, board_path: str, full: bool = False, recent_per_collection: int = 6, ) -> str: """Validate and read either a compact council summary or the full blackboard.""" try: board = _board(board_path) if full: _bb("validate", str(board)) return _bb("show", str(board)) return _bb( "summary", str(board), "--limit", str(max(1, min(int(recent_per_collection or 6), 20))), ) except Exception as error: return _error(error)Technical Analysis
The
_boardvalidation prevents directory traversal by requiring the resolved file to be directly inside the global council-board directory. However, it does not verify that the authenticated Open WebUI user owns or is authorized to access the selected board.Only
start_councilaccepts the Open WebUI__user__context, and it uses that context when creating the room. The methods that read, modify, route, resolve, cancel, or hand over a council do not accept or validate__user__. Consequently, knowledge of a valid board path is treated as sufficient authorization.The board path is intentionally placed in the coun ...[truncated 2475 chars]
- Remediation
View remediation
Remediation Suggestions
- Require Open WebUI's authenticated
__user__context on every board operation, not only onstart_council. - Persist immutable ownership metadata when creating a board, including the owner user ID and associated chat ID.
- Before every read, write, route, cancellation, resolution, or handover, verify that the authenticated user owns the board or has an explicit access-control-list grant.
- Do not trust a board path supplied by the model. Prefer an opaque board identifier resolved server-side after authorization.
- Bind each board to its Open WebUI chat and reject calls originating from unrelated chats where invocation context is available.
- Apply restrictive filesystem permissions and, where practical, use per-user board directories inaccessible to other service users.
- Avoid returning absolute filesystem paths to browser-visible chats. Return opaque identifiers or capability tokens with short lifetimes and narrowly scoped permissions.
- Add audit logging for the authenticated user, chat, board, operation, route, and authorization outcome.
- Add tests proving that one Open WebUI user cannot read, modify, route, cancel, or hand over another user's board, even when the exact path is known.
- Require Open WebUI's authenticated
