Jupyter Server: Gateway WebSocket handler bypasses kernel execute authorization
Impact
Jupyter Server is the backend for Jupyter web applications. From 2.0.0 until 2.6.0, enabling GatewayClient.url replaced the normal KernelWebsocketHandler with WebSocketChannelsHandler, which authenticated the user but did not call authorizer.is_authorized(...) for the execute action on the kernels resource. A restricted authenticated user could therefore open an upstream kernel channel and obtain kernel execution despite the configured Authorizer denying that action, exposing data and credentials available to the kernel and permitting modification or disruption of the kernel environment.…
Source excerpt · GitHub_MAffected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
jupyter-server · jupyter_server
| Version / range | Source status |
|---|---|
| >= 2.0.0, < 2.6.0 | affected |
Original source description
Jupyter Server is the backend for Jupyter web applications. From 2.0.0 until 2.6.0, enabling GatewayClient.url replaced the normal KernelWebsocketHandler with WebSocketChannelsHandler, which authenticated the user but did not call authorizer.is_authorized(...) for the execute action on the kernels resource. A restricted authenticated user could therefore open an upstream kernel channel and obtain kernel execution despite the configured Authorizer denying that action, exposing data and credentials available to the kernel and permitting modification or disruption of the kernel environment. The default gateway configuration is fixed in version 2.6.0. In 2.6.0 and later, the same authorization bypass remains possible when a deployment manually registers the deprecated jupyter_server.gateway.handlers module, because its handler still omits the configured kernel-execute authorization decision.
References
- Security advisory github.com/jupyter-server/jupyter_server/security/advisories/GHSA-354v-3q48-cv69
- Patch github.com/jupyter-server/jupyter_server/pull/1261
- Patch github.com/jupyter-server/jupyter_server/commit/35ffe5d435682128da16dc144a8e9e9f8fa85dd8
- Release notes github.com/jupyter-server/jupyter_server/releases/tag/v2.6.0