The terminal-server reverse proxy in backend/open_webui/routers/terminals.py does not fully confine the user-controlled path segment before forwarding it to an admin-configured terminal server. An authenticated user who has been granted access to a terminal server can craft path values containing encoded ../ traversal sequences that escape the intended path (or policy) scope on that server, reaching unintended endpoints and files on the terminal-server host. Where the terminal server fans requests out to internal services, this also gives SSRF-style reach into those services.
This is a separate code path from the /api/v1/retrieval/process/web SSRF (GHSA-c6xv-rcvw-v685), with its own input. Two distinct vectors are consolidated here:
_sanitize_proxy_path mitigation using double-encoded dots (%252e%252e).The attacker-controlled input is the request path, supplied by the non-admin user, not anything an administrator configures, so this is not an admin-trust / Rule-9 situation.
The proxy route forwards an arbitrary trailing path to the configured terminal server:
# routers/terminals.py
@router.api_route('/{server_id}/{path:path}', methods=PROXY_METHODS)
async def proxy_terminal(server_id, path, request, user=Depends(get_verified_user)):
...
safe_path = _sanitize_proxy_path(path)
if safe_path is None:
return JSONResponse({'error': 'Invalid path'}, status_code=400)
target_url = f'{base_url}/{safe_path}'
policy_id = connection.get('policy_id')
if policy_id:
target_url = f'{base_url}/p/{policy_id}/{safe_path}'
Access requires has_connection_access(user, connection, ...), i.e. a non-admin user the administrator has granted to that terminal server.
The path was originally concatenated to the base URL with no...
0.1.1240.1.1250.2.00.2.10.2.20.2.30.2.40.2.50.3.00.3.1+147 more0.9.6Exploitability
AV:NAC:LPR:LUI:NScope
S:CImpact
C:HI:NA:NCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N