Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cold-pillows-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@e2b/code-interpreter-template": patch
---

Pin `jupyter-server` `root_dir` to `/home/user` so session creation keeps working with jupyter-server 2.18.0's path-traversal hardening
13 changes: 13 additions & 0 deletions template/jupyter_server_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
c = get_config() # noqa


# Pin the contents root directory.
#
# Sessions are created with a relative path (a bare uuid, see
# server/contexts.py). Without an explicit root_dir, jupyter-server
# inherits the process working directory as its root — which is "/"
# under systemd (jupyter.service has no WorkingDirectory). Since
# jupyter-server 2.18.0 (CVE-2026-35397 path-traversal hardening), a
# root_dir of "/" makes every POST /api/sessions fail with
# "<uuid> is outside root contents directory", so the server never
# starts. Pinning it to /home/user matches the execution cwd.
c.ServerApp.root_dir = "/home/user"


# Set the Access-Control-Allow-Origin header
#
# Use '*' to allow any origin to access your server.
Expand Down
2 changes: 1 addition & 1 deletion template/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Jupyter server requirements
jupyter-server==2.16.0
jupyter-server==2.18.0
ipykernel==6.31.0
ipython==9.14.0

Expand Down
Loading