jupyterlab-xssguard

A JupyterLab extension that mitigates XSS attacks by sandboxing the HTML output element of code cells.
The extension works by embedding the HTML output of code cells inside a sandboxed iframe, that disallows access to its parent document.
In case of an XSS attack such as CVE-2024-27132, the JavaScript payload will not be able to escape the plugin's sandbox to run arbitrary Python code or access sensitive DOM elements.
No XSSGuard

With XSSGuard

Requirements
Installation
We recommend installing the extension through JupyterLab's Extension Manager -

For a standalone installation, execute:
pip install jupyterlab-xssguard