CVE-2026-44553: Open WebUI Stale Admin Role Vulnerability

HIGH
Advisory Identifier: GHSA-45m8-cpm2-3v65
CVSS 8.1
CWE-613 CWE-384 CWE-863
Published
Advisory Summary

CVE-2026-44553 is a HIGH (CVSS 8.1) stale admin role vulnerability (CWE-613: Insufficient Session Expiration) affecting Open WebUI libraries in the PyPI ecosystem. The issue involves stale admin role in socket.io session pool enables post-demotion cross-user note access. Remediation is available by upgrading affected packages to version 0.9.0.

CVE-2026-44553 at a Glance

CVE Identifier CVE-2026-44553
GHSA Identifier GHSA-45m8-cpm2-3v65
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-613: Insufficient Session Expiration
Affected Product Open WebUI
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-44553

To remediate this vulnerability, upgrade all affected Open WebUI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

open-webui fixed: 0.9.0
pip install open-webui>=0.9.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show open-webui

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-44553, inspect your installed packages using pip:

pip show open-webui

Analyze the terminal output to locate any version of Open WebUI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.9.0), your application is affected.

Note: The pip show open-webui command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-613: Insufficient Session Expiration, where according to wasc, "insufficient session expiration is when a web site permits an attacker to reuse old session credentials or session ids for authorization.". In Open WebUI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

# 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, `connect` handler — role snapshotted into SESSION_POOL) - `backend/open_webui/socket/main.py` (lines 393-398, `heartbeat` handler — 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. ```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 = 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): return ``` ## Attack Scenario 1. User B is an admin and has an active browser session with a live Socket.IO connection. `SESSION_POOL[sid]` records `role='admin'`. 2. Admin A demotes User B to a regular user via `POST /api/v1/users/{B_id}/update`. The DB `user.role` becomes `'user'`. 3. No Socket.IO disconnect, no SESSION_POOL 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 `last_seen_at`. 5. User B emits `ydoc:document:join` with `document_id = 'note:<victim_note_id>'` for any note they do not own. 6. The handler at line 538 evaluates `user.get('role') != 'admin'` — returns `False` because `SESSION_POOL` 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.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)

CVE-2026-44553 Affected Open WebUI Versions

1 component(s)
Fixed Versions:
0.9.0
Product / Package Ecosystem Affected Versions Fixed Version
open-webui
PyPI
< 0.9.0
0.9.0

References

Frequently Asked Questions

What is CVE-2026-44553?
CVE-2026-44553 is a security vulnerability in Open WebUI involving Stale Admin Role in Socket.IO Session Pool Enables Post-Demotion Cross-User Note Access under CWE-613: Insufficient Session Expiration.
Which Open WebUI versions are affected?
Affected versions include releases prior to 0.9.0 across affected packages: open-webui.
What version fixes CVE-2026-44553?
Upgrading to 0.9.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is open-webui affected?
Yes, open-webui is affected in releases prior to 0.9.0. Upgrade your dependency to 0.9.0 or later.
What is the CVSS score of CVE-2026-44553?
CVE-2026-44553 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-44553?
CVE-2026-44553 is classified under CWE-613: Insufficient Session Expiration (According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.").
How can I check PyPI dependencies for CVE-2026-44553?
Run the dependency tree command: 'pip show open-webui'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-45m8-cpm2-3v65",
  "modified" : "2026-05-15T23:52:21Z",
  "published" : "2026-05-08T19:43:49Z",
  "aliases" : [ "CVE-2026-44553" ],
  "summary" : "Open WebUI: Stale Admin Role in Socket.IO Session Pool Enables Post-Demotion Cross-User Note Access",
  "details" : "# Stale Admin Role in Socket.IO Session Pool Enables Post-Demotion Cross-User Note Access\n\n## Affected Component\n\nSocket.IO session state and role-check callsites:\n- `backend/open_webui/socket/main.py` (lines 330-351, `connect` handler — role snapshotted into SESSION_POOL)\n- `backend/open_webui/socket/main.py` (lines 393-398, `heartbeat` handler — does not refresh role)\n- `backend/open_webui/socket/main.py` (line 538, `ydoc:document:join` — uses cached role for admin check)\n- `backend/open_webui/socket/main.py` (line 611, `document_save_handler` — uses cached role for admin check)\n- `backend/open_webui/routers/users.py` (lines 557-633, role update — does not invalidate SESSION_POOL)\n- `backend/open_webui/routers/users.py` (line 641, user delete — does not invalidate SESSION_POOL)\n\n## Affected Versions\n\nCurrent main branch (commit `6fdd19bf1`) and likely all versions with the collaborative document (Yjs) Socket.IO handlers.\n\n## Description\n\nWhen 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.\n\nRole 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).\n\nHTTP 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.\n\n```python\n# socket/main.py:330-351 — role snapshotted at connect time\nasync def connect(sid, environ, auth):\n    user = None\n    if auth and 'token' in auth:\n        data = decode_token(auth['token'])\n        if data is not None and 'id' in data:\n            user = Users.get_user_by_id(data['id'])\n        if user:\n            SESSION_POOL[sid] = {\n                'id': user.id,\n                'role': user.role,   # ← snapshotted, never refreshed\n                ...\n            }\n\n# socket/main.py:393-398 — heartbeat refreshes last_seen_at only\nasync def heartbeat(sid, data):\n    user = SESSION_POOL.get(sid)\n    if user:\n        SESSION_POOL[sid] = {**user, 'last_seen_at': int(time.time())}\n        # role is carried forward unchanged\n\n# socket/main.py:538 — admin check against cached role\nif user.get('role') != 'admin' and not has_access(user_id, 'note', note_id, 'read', db=db):\n    return\n```\n\n## Attack Scenario\n\n1. User B is an admin and has an active browser session with a live Socket.IO connection. `SESSION_POOL[sid]` records `role='admin'`.\n2. Admin A demotes User B to a regular user via `POST /api/v1/users/{B_id}/update`. The DB `user.role` becomes `'user'`.\n3. No Socket.IO disconnect, no SESSION_POOL update, no token revocation event is triggered by the role change.\n4. User B's client continues sending `heartbeat` events every few seconds; these are accepted and only refresh `last_seen_at`.\n5. User B emits `ydoc:document:join` with `document_id = 'note:<victim_note_id>'` for any note they do not own.\n6. The handler at line 538 evaluates `user.get('role') != 'admin'` — returns `False` because `SESSION_POOL` still holds the stale `admin` role. Access check is bypassed, User B joins the document room, receives full document state and live updates.\n7. 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.update_note_by_id`.\n\nThe 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.\n\n## Impact\n\n- Read access to any user's notes after admin privileges have been revoked\n- Write access (content injection, overwrite) to any user's notes under the same conditions\n- The stale privilege is bounded only by the attacker's willingness to keep the Socket.IO connection alive; heartbeats extend the session indefinitely\n- Official admin demotion or user deletion gives a false sense of security — HTTP access is correctly revoked, but real-time collaborative access silently continues\n\n## Preconditions\n\n- Attacker must have an active Socket.IO connection established while they held admin role\n- Attacker must retain the Socket.IO session after demotion/deletion (trivial — just don't close the browser)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "open-webui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.9.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.8.12"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/open-webui/open-webui/security/advisories/GHSA-45m8-cpm2-3v65"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44553"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/open-webui/open-webui"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-384", "CWE-613", "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-08T19:43:49Z",
    "nvd_published_at" : "2026-05-15T20:16:46Z"
  }
}