SecuritySecurity track

Exposed notebooks & dashboards

Read it in Chapter 6 · checkpoint +50 XP →

A Jupyter server with no token on 0.0.0.0 is remote code execution for anyone who can reach it.

Jupyter is designed to run arbitrary code: that's the point. With --ip=0.0.0.0 and authentication disabled (empty token and password), anyone who can reach the port can run commands as the notebook's user. The same applies to many ML dashboards, experiment trackers and inference UIs.

Safer patterns

  • Bind to 127.0.0.1 and reach it through an SSH tunnel or an authenticated gateway (JupyterHub with SSO).
  • Never disable tokens or passwords. Use TLS when traffic leaves the host.
  • Firewall compute nodes: only the scheduler, monitoring and admin networks should reach them.
  • Run notebooks inside scheduler allocations so they're time-limited and accounted.

Detecting: ss -tlnp shows listeners on 0.0.0.0. Server logs record requests from unexpected IPs. Network monitoring flags inbound connections to compute nodes from outside.

Use it in a mission

Related

Sources & further reading

Written for LazyLab in our own words; sources are cited for depth and verification.