CVE-2026-44553: Open WebUI: Stale Admin Role in Socket.IO Session Pool Enables Post-Demotion Cross-User Note Access
Stale Admin Role in Socket.IO Session Pool Enables Post-Demotion Cross-User Note Access
Affected Component
Socket.IO session state and role-check callsites: - backend/openwebui/socket/main.py (lines 330-351, connect handler — role snapshotted into SESSIONPOOL) - backend/openwebui/socket/main.py (lines 393-398, heartbeat handler — does not refresh role) - backend/openwebui/socket/main.py (line 538, ydoc:document:join — uses cached role for admin check) - backend/openwebui/socket/main.py (line 611, documentsavehandler — uses cached role for admin check) - backend/openwebui/routers/users.py (lines 557-633, role update — does not invalidate SESSIONPOOL) - backend/openwebui/routers/users.py (line 641, user delete — does not invalidate SESSIONPOOL)
Affected Versions
Current main branch (commit 6fdd19bf1) and likely all versions with the collaborative document (Yjs) Socket.IO handlers.
Description
When a user connects via Socket.IO, the connect handler authenticates them via JWT and stores their user record (including role) in the in-memory SESSIONPOOL dictionary keyed by session ID. The heartbeat handler keeps the session alive indefinitely but only refreshes the lastseenat timestamp — never the role.
Role checks in the Yjs collaborative document handlers (ydoc:document:join, documentsavehandler) consult the cached SESSIONPOOL role rather than the database. Meanwhile, administrative role changes and user deletions do not iterate SESSIONPOOL to disconnect affected sessions. As a result, a user whose admin role has been revoked retains admin privileges within their existing Socket.IO session for as long as they keep the connection alive (via automatic heartbeats).
HTTP endpoints are not affected — getcurrentuser at utils/auth.py refetches the user record from the database on every request. The gap is exclusive to the Socket.IO session cache.
python socket/main.py:330-351 — role snapshotted at connect time async def connect(sid, environ, auth): user = None if auth and 'token' in auth: data = decodetoken(auth['token']) if data is not None and 'id' in data: user = Users.getuserbyid(data['id']) if user: SESSIONPOOL[sid] = { 'id': user.id, 'role': user.role, # ← snapshotted, never refreshed ... }
socket/main.py:393-398 — heartbeat refreshes lastseenat only async def heartbeat(sid, data): user = SESSIONPOOL.get(sid) if user: SESSIONPOOL[sid] = {user, 'lastseenat': int(time.time())} # role is carried forward unchanged
socket/main.py:538 — admin check against cached role if user.get('role') != 'admin' and not hasaccess(userid, 'note', noteid, 'read', db=db): return
Attack Scenario
1. User B is an admin and has an active browser session with a live Socket.IO connection. SESSIONPOOL[sid] records role='admin'. 2. Admin A demotes User B to a regular user via POST /api/v1/users/{Bid}/update. The DB user.role becomes 'user'. 3. No Socket.IO disconnect, no SESSIONPOOL update, no token revocation event is triggered by the role change. 4. User B's client continues sending heartbeat events every few seconds; these are accepted and only refresh lastseenat. 5. User B emits ydoc:document:join with documentid = 'note:<victimnoteid>' for any note they do not own. 6. The handler at line 538 evaluates user.get('role') != 'admin' — returns False because SESSIONPOOL still holds the stale admin role. Access check is bypassed, User B joins the document room, receives full document state and live updates. 7. User B emits ydoc:document:update for the same note. The handler at line 611 performs the same cached-admin check, bypasses authorization, and persists attacker-controlled content to the victim's note via Notes.updatenotebyid.
The same bypass occurs if the user is deleted entirely (deleteuserbyid) — the deleted user retains admin privileges on their live socket until disconnection.
Impact
- Read access to any user's notes after admin privileges have been revoked - Write access (content injection, overwrite) to any user's notes under the same conditions - The stale privilege is bounded only by the attacker's willingness to keep the Socket.IO connection alive; heartbeats extend the session indefinitely - Official admin demotion or user deletion gives a false sense of security — HTTP access is correctly revoked, but real-time collaborative access silently continues
Preconditions
- Attacker must have an active Socket.IO connection established while they held admin role - Attacker must retain the Socket.IO session after demotion/deletion (trivial — just don't close the browser)
Other sources
Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to 0.9.0, administrative role changes and user deletions do not iterate SESSIONPOOL to disconnect affected sessions. As a result, a user whose admin role has been revoked retains admin privileges within their existing Socket.IO session for as long as they keep the connection alive (via automatic heartbeats). The gap is exclusive to the Socket.IO session cache. This vulnerability is fixed in 0.9.0.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-44553?
The severity of CVE-2026-44553 is critical due to the potential for unauthorized access to user notes.
How do I fix CVE-2026-44553?
To fix CVE-2026-44553, upgrade the open-webui package to version 0.9.0 or later.
What is the impact of CVE-2026-44553?
CVE-2026-44553 allows stale admin roles to access cross-user notes after a user's role has been demoted.
Which versions are affected by CVE-2026-44553?
CVE-2026-44553 affects open-webui versions up to and including 0.8.12.
Where can I find more information about CVE-2026-44553?
More information about CVE-2026-44553 can generally be found in the GitHub advisories for open-webui.