CVE-2026-40171
Stored XSS in Jupyter Notebook and JupyterLab Help Extensions
Publication date: 2026-05-06
Last updated on: 2026-05-06
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| jupyter | notebook | From 7.0.0 (inc) to 7.5.5 (inc) |
| jupyter | jupyterlab | to 4.5.6 (inc) |
| jupyter | notebook_help_extension | to 7.5.6 (exc) |
| jupyter | jupyterlab_help_extension | to 4.5.7 (exc) |
| jupyter | notebook | 7.5.6 |
| jupyter | jupyterlab | 4.5.7 |
| jupyter | notebook_help_extension | 7.5.6 |
| jupyter | jupyterlab_help_extension | 4.5.7 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-79 | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability exists in Jupyter Notebook versions 7.0.0 through 7.5.5, JupyterLab versions 4.5.6 and earlier, and related help-extension packages before certain fixed versions. It is a stored cross-site scripting (XSS) issue in the help command linker that can be exploited by an attacker who crafts a malicious notebook file.
The malicious notebook contains elements that look like legitimate controls and can trigger execution when a user interacts with them. This allows the attacker to steal the user's authentication token with a single click.
With the stolen token, the attacker can fully take over the Jupyter session via the REST API, including reading and modifying files, executing arbitrary code through kernels, and creating terminals for shell access.
The issue has been fixed in Notebook 7.5.6, JupyterLab 4.5.7, and corresponding help-extension versions. Workarounds include disabling the affected help extensions or setting allowCommandLinker to false in the sanitizer configuration.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
This vulnerability allows an attacker to steal authentication tokens and take over Jupyter sessions, potentially leading to unauthorized access to sensitive data and execution of arbitrary code.
Such unauthorized access and data exposure could impact compliance with standards and regulations like GDPR and HIPAA, which require protection of personal and sensitive information and mandate controls to prevent unauthorized access.
However, the provided information does not explicitly describe the direct effects on compliance with these standards.
How can this vulnerability impact me? :
This vulnerability can have severe impacts including complete takeover of your Jupyter session.
- The attacker can steal your authentication token.
- They can read and modify your files.
- They can execute arbitrary code by accessing kernels.
- They can create terminals to gain shell access.
This means an attacker can fully control your Jupyter environment, potentially leading to data loss, unauthorized data access, and system compromise.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, you should upgrade to the fixed versions: Notebook 7.5.6, JupyterLab 4.5.7, @jupyter-notebook/help-extension 7.5.6, and @jupyterlab/help-extension 4.5.7.
As a workaround, you can disable the affected help extensions or set allowCommandLinker to false in the sanitizer configuration.