-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
Bug/Security improvement: Jupyter modules bind to all interfaces unnecessarily
The two Registry modules for Jupyter Notebook and Jupyter Lab explicitly bind to all network interfaces (--ServerApp.ip='*'):
- https://github.com/coder/registry/blob/main/registry/coder/modules/jupyter-notebook/run.sh#L43
- https://github.com/coder/registry/blob/main/registry/coder/modules/jupyterlab/run.sh#L54
Combined with disabled authentication (--ServerApp.token='' --ServerApp.password=''), this exposes an unauthenticated Jupyter server to the entire network. In Kubernetes environments, any pod on the same network can connect directly, bypassing Coder's authentication layer.
Why this is unnecessary
Coder's port forwarding works through the agent locally, so Jupyter only needs to bind to localhost. The default Jupyter behavior (without --ServerApp.ip) already binds to localhost on both IPv4 and IPv6:
tcp6 0 0 ::1.8888 *.* LISTEN
tcp4 0 0 127.0.0.1.8888 *.* LISTEN
Proposed fix
- Remove
--ServerApp.ip='*'entirely (secure by default) - Add an optional
hostvariable defaulting tolocalhostor127.0.0.1for users who explicitly need different behavior
Metadata
Metadata
Assignees
Labels
No labels