pypi panel 1.9.6
Version 1.9.6

latest releases: 1.10.2, 1.11.2
one hour ago

Panel 1.9.6 is a security release for Python 3.10 and 3.11 that backports the fixes for the nine issues fixed in 1.11.2 and 1.10.2. It also includes the credential-handling, WSGI, bundler and VTKJS hardening from 1.11.2 for the Tornado server. We recommend that all users upgrade, and that users who can move to 1.11.2. If you cannot update right away to 1.9.6, 1.10.2 or 1.11.2 it is advised to disable the Jupyter panel preview extension with jupyter server extension disable panel.io.jupyter_server_extension. Many thanks to @folbricht-ant (Anthropic), Bin Luo (UESTC), @NotAFlightRisk and @gistrec for reporting these issues responsibly, and to our internal security audit for the rest.

🔒 Security

  • Harden the Jupyter preview server extension (panel.io.jupyter_server_extension) against code injection and cross-site requests (GHSA-4jp4-79rh-q63h)
  • Escape the Str pane's text before rendering it as HTML (GHSA-fwj9-wv8q-h7x9)
  • Reject OAuth logins with an empty state parameter (GHSA-3349-j265-r4mf)
  • Confine FileSelector to its root_directory (GHSA-44cr-qc94-4g5q)
  • Stop pn.state.location.sync from loading server files named in the URL into DataFrame and Array parameters (GHSA-f4hp-c7jm-p858)
  • Stop the is_guest cookie from replacing the logged-in identity (GHSA-gfgq-cv3v-p4wc)
  • Bind OAuth tokens in user_data to the user they were issued for (GHSA-8w8m-vpcr-jfr7)
  • Escape the error message shown when a function-served app fails, using a new escape option on the Alert pane (GHSA-2qjx-pj4r-pgfg)
  • Require authentication for /rest/session_info, bind sessions to the user that created them and stop client-built session tokens from setting a session's headers and cookies (GHSA-4v47-xr5g-phqc). On 1.9.6, /rest/session_info requires a login but not admin rights, and the FastAPI server's session info endpoint is not authenticated; both only return session digests. Session binding and the session token checks only apply to panel serve and pn.serve, not to the FastAPI server. Upgrade to 1.10.2 or 1.11.2 for the full fix.
  • Set SameSite=Lax and HttpOnly on the cookies Panel sets during authentication, and Secure over https, and only include cookies and credential-bearing headers in the autoload.js session token, and in sessions created from client-built tokens, when the including page is same-origin or allowed by --allow-websocket-origin. On 1.9.6 this applies to panel serve and pn.serve, not to the FastAPI server (#9195, #9197)
  • Refuse to mount WSGI apps on a server with authentication enabled, since they bypass Panel's authentication (#9194)
  • Stop the bundler from silently retrying failed downloads without TLS certificate verification (#9176)
  • Only accept http(s) URLs and local paths in VTKJS, and check the .vtkjs extension on the URL path instead of the whole string (#9175)
  • Behaviour change: A preview link opened from outside the Jupyter page, such as a link on another site, a bookmark or a typed URL, now shows a confirmation page before a kernel is started
  • Behaviour change: Preview paths must point to an existing file under the Jupyter server root; absolute paths and paths outside the root are rejected
  • Behaviour change: Only Python kernels can be selected with the kernel argument
  • Behaviour change: The WebSocket, static and component routes of the extension require Jupyter authentication
  • Behaviour change: Remove the unused single-notebook mode of the extension, configured with the notebook_path handler argument
  • Behaviour change: /rest/session_info and the FastAPI /session_info endpoint key sessions by a digest of the session id instead of the id itself
  • Behaviour change: The is_guest cookie is now signed and only honoured on paths that allow guest access, and an unsigned one is ignored; check pn.state.user == 'guest' instead of reading the cookie
  • Behaviour change: Exceptions shown by ChatFeed and ChatStep are rendered as plain-text alerts, and a ChatStep error is added as its own pane instead of being appended to the last message
  • Behaviour change: Markdown(disable_math=True) now also stops math from being typeset in the browser
  • Behaviour change: With unsigned session ids, a session created by the WebSocket takes its headers and cookies from the WebSocket request, so behind a load balancer without sticky sessions headers a proxy only adds to the page request are missing; use --session-ids signed with a shared BOKEH_SECRET_KEY to keep them
  • Behaviour change: An authenticated app embedded in an iframe on another site no longer receives its cookies, and a page not covered by --allow-websocket-origin gets an autoload.js token without the user's cookies and headers. --allow-websocket-origin=* no longer grants credentials; list the origins or use a pattern such as *.example.com (#9195, #9197)
  • Behaviour change: get_server and pn.serve raise a ValueError when a WSGI app is mounted and authentication is configured (#9194)
  • Behaviour change: panel bundle fails on certificate errors, for example behind a TLS-inspecting proxy, unless a CA bundle is configured with REQUESTS_CA_BUNDLE or SSL_CERT_FILE or PANEL_BUNDLE_INSECURE=1 is set (#9176)
  • Behaviour change: VTKJS rejects strings with a scheme other than http or https, and a local path to a missing file raises FileNotFoundError instead of being treated as a URL (#9175)

Don't miss a new panel release

NewReleases is sending notifications on new releases.