CVE-2026-44553: Open WebUI: Stale Admin Role in Socket.IO Session Pool Enables Post-Demotion Cross-User Note Access
Open WebUI up to 0.8.12 caches a user's role in its Socket.IO session pool and never refreshes it. A user demoted from admin, or deleted, keeps admin rights in collaborative note editing for as long as their socket stays connected. Fixed in 0.9.0.
Published May 8, 2026 · Updated May 15, 2026 · Analysis Nov 11, 2026
What an attacker can do
The connect handler in backend/open_webui/socket/main.py authenticates the JWT and copies the user record, including role, into the in-memory SESSION_POOL. The heartbeat handler only updates last_seen_at, so automatic heartbeats keep the session alive without ever re-reading the role. The Yjs collaborative document handlers, ydoc:document:join and document_save_handler, decide admin access from that cached role instead of the database.
The role update and user delete routes in routers/users.py do not walk SESSION_POOL to disconnect the affected sessions. So a demoted admin, or a deleted user, can still join and save other users' notes through the socket. The HTTP API is not affected, because get_current_user reloads the user from the database on every request.
The attacker is a former administrator, or a user whose account was removed, who keeps a browser tab open. That fits an insider whose access was just revoked: the revocation does not take effect where it matters most for that person. The reporter confirmed it on commit 6fdd19bf1 and says likely all versions with the Yjs handlers are affected.
Who is affected
Open WebUI (open-webui on PyPI) up to and including 0.8.12, and likely every version with the collaborative document Socket.IO handlers. The exposure only exists for sessions opened before a role change or deletion. Check:
pip show open-webuiopen-webui
- Ecosystem
- PyPI
- Affected
- <= 0.8.12
- Fixed in
- 0.9.0
- Check
pip show open-webui
How to fix it
Upgrade to Open WebUI 0.9.0 or later:
pip install --upgrade open-webuiThe advisory lists no workaround. After you demote or delete a privileged user on an affected version, restart the Open WebUI process. That clears the in-memory SESSION_POOL and forces every client to reconnect and authenticate again.
How to tell if you were hit
Compare note changes in the audit trail with the time a user lost admin rights or was deleted. Look for ydoc:document:join and document save activity from a user after their demotion. Long-lived Socket.IO connections that began before a role change are the ones at risk.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
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/open_webui/socket/main.py(lines 330-351,connecthandler — role snapshotted into SESSION_POOL)backend/open_webui/socket/main.py(lines 393-398,heartbeathandler — does not refresh role)backend/open_webui/socket/main.py(line 538,ydoc:document:join— uses cached role for admin check)backend/open_webui/socket/main.py(line 611,document_save_handler— uses cached role for admin check)backend/open_webui/routers/users.py(lines 557-633, role update — does not invalidate SESSION_POOL)backend/open_webui/routers/users.py(line 641, user delete — does not invalidate SESSION_POOL)
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 SESSION_POOL dictionary keyed by session ID. The heartbeat handler keeps the session alive indefinitely but only refreshes the last_seen_at timestamp — never the role.
Role checks in the Yjs collaborative document handlers (ydoc:document:join, document_save_handler) consult the cached SESSION_POOL role rather than the database. Meanwhile, administrative role changes and user deletions do not iterate SESSION_POOL 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 — get_current_user at [utils/auth.py](backend/open_webui/utils/auth.py) refetches the user record from the database on every request. The gap is exclusive to the Socket.IO session cache.
# 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 = decode_token(auth['token'])
if data is not None and 'id' in data:
user = Users.get_user_by_id(data['id'])
if user:
SESSION_POOL[sid] = {
'id': user.id,
'role': user.role, # ← snapshotted, never refreshed
...
}
# socket/main.py:393-398 — heartbeat refreshes last_seen_at only
async def heartbeat(sid, data):
user = SESSION_POOL.get(sid)
if user:
SESSION_POOL[sid] = {**user, 'last_seen_at': int(time.time())}
# role is carried forward unchanged
# socket/main.py:538 — admin check against cached role
if user.get('role') != 'admin' and not has_access(user_id, 'note', note_id, 'read', db=db):
returnAttack Scenario
- User B is an admin and has an active browser session with a live Socket.IO connection.
SESSION_POOL[sid]recordsrole='admin'. - Admin A demotes User B to a regular user via
POST /api/v1/users/{B_id}/update. The DBuser.rolebecomes'user'. - No Socket.IO disconnect, no SESSION_POOL update, no token revocation event is triggered by the role change.
- User B's client continues sending
heartbeatevents every few seconds; these are accepted and only refreshlast_seen_at. - User B emits
ydoc:document:joinwithdocument_id = 'note:<victim_note_id>'for any note they do not own. - The handler at line 538 evaluates
user.get('role') != 'admin'— returnsFalsebecauseSESSION_POOLstill holds the staleadminrole. Access check is bypassed, User B joins the document room, receives full document state and live updates. - User B emits
ydoc:document:updatefor 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 viaNotes.update_note_by_id.
The same bypass occurs if the user is deleted entirely (delete_user_by_id) — 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)
Credited to Classic298.
Questions
- Does revoking admin rights end the user's sessions?
Not on 0.8.12 and earlier. The cached role stays in the Socket.IO session pool while heartbeats continue.
- Are HTTP API calls affected?
No. They reload the user from the database on each request. Only the Socket.IO collaborative document handlers use the cached role.
- What fixes CVE-2026-44553?
Open WebUI 0.9.0 fixes it. Versions up to and including 0.8.12 are affected, and no workaround is listed.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Open WebUI vulnerabilities
All Open WebUI entriesCVE-2026-87011
Open WebUI: Unauthenticated requests can stall the server via uncached OIDC fetches in back-channel logout
high7.5Sep 10, 2026CVE-2026-87012
Open WebUI: Any authenticated user can suppress calendar alerts instance-wide via a non-numeric alert value
medium4.3Sep 10, 2026CVE-2026-87013
Open WebUI: Any authenticated user can start a non-terminating request via a folder parent cycle
medium4.3Sep 10, 2026CVE-2026-87014
Open WebUI: Admin demoted through SSO role sync keeps read and write access to all users' notes
medium6.5Sep 10, 2026CVE-2026-87015
Open WebUI: A user's session cookies are sent to tool servers configured for bearer authentication
medium6.8Sep 10, 2026CVE-2026-87016
Open WebUI: Sign-in as another user via wildcard characters in the OAuth subject claim on SQLite
high8.1Sep 10, 2026
