Security in Jupyter

Jupyter notebooks are created in order to be shared with other users, in many cases over the Internet. However, Jupyter notebooks can execute arbitrary code and generate arbitrary code. This can be a problem if malicious aspects have been placed in a notebook. The default security mechanisms for Jupyter notebooks include the following:

  • Raw HTML is always sanitized (checked for malicious coding). Further information can be found at https://developers.google.com/caja.
  • You cannot run external JavaScript.
  • Cell contents (especially HTML and JavaScript) are not trusted (requires user validation to continue).
  • The output from any cell is not trusted.
  • All other HTML or JavaScript is never trusted. Clearing the output will cause the notebook ...

Get Learning Jupyter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.