PYSEC-2026-3599

See a problem?
Import Source
https://github.com/pypa/advisory-database/blob/main/vulns/open-webui/PYSEC-2026-3599.yaml
JSON Data
https://api.osv.dev/v1/vulns/PYSEC-2026-3599
Aliases
Published
2026-08-04T11:34:42.643342Z
Modified
2026-08-04T14:30:28.708679396Z
Severity
  • 3.1 (Low) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N CVSS Calculator
Summary
Open WebUI: Unauthenticated WebSocket Access to Collaborative Document Handlers (ydoc:awareness:update, ydoc:document:leave)
Details

Summary

The Socket.IO server is configured with always_connect=True (lines 78, 91 in backend/open_webui/socket/main.py) and the connect handler (line 329) never rejects unauthenticated connections. Two Ydoc event handlers have zero authentication checks, allowing unauthenticated clients to interact with collaborative document sessions.

Vulnerable Code

ydoc:awareness:update (line 741) — No auth check at all

@sio.on('ydoc:awareness:update')
async def yjs_awareness_update(sid, data):
    document_id = data['document_id']
    user_id = data.get('user_id', sid)
    update = data['update']
    # No SESSION_POOL check, no room membership check
    await sio.emit(
        'ydoc:awareness:update',
        {'document_id': document_id, 'user_id': user_id, 'update': update},
        room=f'doc_{document_id}',
        skip_sid=sid,
    )

ydoc:document:leave (line 711) — No auth check at all

@sio.on('ydoc:document:leave')
async def yjs_document_leave(sid, data):
    document_id = data['document_id']
    user_id = data.get('user_id', sid)
    # No auth check
    await YDOC_MANAGER.remove_user(document_id=document_id, user_id=sid)
    await sio.emit('ydoc:user:left',
        {'document_id': document_id, 'user_id': user_id},
        room=f'doc_{document_id}')

Root Cause: always_connect=True (line 78)

sio = socketio.AsyncServer(
    always_connect=True,   # Never rejects connections
    ...
)

The connect handler (line 329) adds authenticated users to SESSION_POOL but never returns False or raises an exception for unauthenticated connections.

Exploitation

  1. An unauthenticated attacker connects via Socket.IO (no token needed)
  2. The attacker emits ydoc:awareness:update with:
    • document_id: a known/guessed note UUID (format: note:{uuid})
    • user_id: spoofed to impersonate any user
    • update: arbitrary awareness data (fake cursor positions, selections)
  3. The fake awareness data is broadcast to all legitimate users in the document room
  4. The attacker can also emit ydoc:document:leave with spoofed user_id to broadcast fake ydoc:user:left events

Impact

  • UI disruption: Fake cursor positions and user presence in collaborative editing sessions
  • User impersonation: Attacker can spoof any user_id in awareness updates
  • Resource exhaustion: Unlimited unauthenticated WebSocket connections maintained by the server

Note: Other Ydoc handlers (ydoc:document:join, ydoc:document:update, ydoc:document:state) correctly check SESSION_POOL membership.

Suggested Fix

  1. Set always_connect=False or reject unauthenticated connections in the connect handler
  2. Add SESSION_POOL checks to ydoc:awareness:update and ydoc:document:leave
  3. Add room membership verification before broadcasting to document rooms

AI Disclosure (per Rule 11): AI (Claude) was used to assist with source code review, identifying potential vulnerability patterns, and drafting this report. The researcher directed the analysis, selected focus areas, and independently verified all findings against a running v0.8.12 Docker instance using real HTTP requests with two test accounts. The PoCs included are reproducible and were confirmed live before submission.

References

Affected packages

PyPI / open-webui

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0.6.16
Fixed
0.10.0

Affected versions

0.*
0.6.16
0.6.18
0.6.19
0.6.20
0.6.21
0.6.22
0.6.23
0.6.24
0.6.25
0.6.26.dev1
0.6.26
0.6.27
0.6.28
0.6.29
0.6.30
0.6.31
0.6.32
0.6.33
0.6.34
0.6.35
0.6.36
0.6.37
0.6.38
0.6.39
0.6.40
0.6.41
0.6.42
0.6.43
0.7.0
0.7.1
0.7.2
0.8.0
0.8.1
0.8.2
0.8.3
0.8.4
0.8.5
0.8.6
0.8.7
0.8.8
0.8.9
0.8.10
0.8.11
0.8.12
0.9.0
0.9.1
0.9.2
0.9.3
0.9.4
0.9.5
0.9.6

Database specific

source
"https://github.com/pypa/advisory-database/blob/main/vulns/open-webui/PYSEC-2026-3599.yaml"