Scope Socket.IO event-caller to the requesting user's own session
Committed by Classic298
fix: scope Socket.IO event-caller to the requesting user's own session (#25763)
get_event_call() routed execute:python / execute:tool events to a client-supplied session_id after only checking the session was connected, not that it belonged to the requester. Verify the target session is owned by the requesting user (metadata user_id) before delivering, so a client cannot route code/tool execution into another user's session.
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>Editor assessment
This commit patches CVE-2026-59216. The subject describes the fix precisely, and the body supplies the missing mechanism: get_event_call routed events to a client-supplied session_id after only checking connectivity, not ownership, so the patch verifies the metadata user_id before delivery. That is exactly the kind of cause-and-effect explanation that lets a reviewer judge the fix without reconstructing it from the diff. The writing is dense in a single paragraph and would read better split into problem and remedy, and there is no scope beyond the generic fix prefix. No tests or migration notes are mentioned, and none are needed for this internal hardening. Minor polish aside, this is a clear, publishable security message.