CVE-2026-40171: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in jupyter notebook
In Jupyter Notebook versions 7.0.0 through 7.5.5, JupyterLab versions 4.5.6 and earlier, and the corresponding @jupyter-notebook/help-extension and @jupyterlab/help-extension packages before 7.5.6 and 4.5.7, a stored cross-site scripting issue in the help command linker can be chained with attacker-controlled notebook content to steal authentication tokens with a single click. An attacker can craft a malicious notebook file containing elements that appear indistinguishable from legitimate controls and trigger execution when a user interacts with them. Successful exploitation allows theft of the user's authentication token and complete takeover of the Jupyter session through the REST API, including reading files, creating or modifying files, accessing kernels to execute arbitrary code, and creating terminals for shell access. This issue has been fixed in 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, disable the affected help extensions or set allowCommandLinker to false in the sanitizer configuration.
AI Analysis
Technical Summary
This vulnerability is a stored cross-site scripting (CWE-79) in the help command linker component of Jupyter Notebook and JupyterLab, affecting versions up to 7.5.5 and 4.5.6 respectively, including related help-extension packages. An attacker can embed malicious content in a notebook file that triggers execution when a user interacts with it, enabling theft of authentication tokens. This token theft allows complete takeover of the user's Jupyter session through the REST API, including file system access, kernel code execution, and terminal creation. The vulnerability is rated high severity with a CVSS 4.0 score of 8.4. Official fixes are available in Notebook 7.5.6, JupyterLab 4.5.7, and updated help-extension packages. Workarounds involve disabling the vulnerable help extensions or configuring the sanitizer to disallow command linker functionality.
Potential Impact
Successful exploitation results in theft of the user's authentication token and full control over the Jupyter session via the REST API. This enables attackers to read and modify files, execute arbitrary code in kernels, and open terminals for shell access, effectively compromising the affected system's confidentiality, integrity, and availability.
Mitigation Recommendations
A fix is available in Jupyter Notebook 7.5.6, JupyterLab 4.5.7, and corresponding help-extension packages. Users should upgrade to these versions to remediate the vulnerability. As a workaround, disabling the affected help extensions or setting allowCommandLinker to false in the sanitizer configuration can mitigate the risk until patching is applied.
CVE-2026-40171: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in jupyter notebook
Description
In Jupyter Notebook versions 7.0.0 through 7.5.5, JupyterLab versions 4.5.6 and earlier, and the corresponding @jupyter-notebook/help-extension and @jupyterlab/help-extension packages before 7.5.6 and 4.5.7, a stored cross-site scripting issue in the help command linker can be chained with attacker-controlled notebook content to steal authentication tokens with a single click. An attacker can craft a malicious notebook file containing elements that appear indistinguishable from legitimate controls and trigger execution when a user interacts with them. Successful exploitation allows theft of the user's authentication token and complete takeover of the Jupyter session through the REST API, including reading files, creating or modifying files, accessing kernels to execute arbitrary code, and creating terminals for shell access. This issue has been fixed in 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, disable the affected help extensions or set allowCommandLinker to false in the sanitizer configuration.
CVSS v4.0
Score 8.4high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability is a stored cross-site scripting (CWE-79) in the help command linker component of Jupyter Notebook and JupyterLab, affecting versions up to 7.5.5 and 4.5.6 respectively, including related help-extension packages. An attacker can embed malicious content in a notebook file that triggers execution when a user interacts with it, enabling theft of authentication tokens. This token theft allows complete takeover of the user's Jupyter session through the REST API, including file system access, kernel code execution, and terminal creation. The vulnerability is rated high severity with a CVSS 4.0 score of 8.4. Official fixes are available in Notebook 7.5.6, JupyterLab 4.5.7, and updated help-extension packages. Workarounds involve disabling the vulnerable help extensions or configuring the sanitizer to disallow command linker functionality.
Potential Impact
Successful exploitation results in theft of the user's authentication token and full control over the Jupyter session via the REST API. This enables attackers to read and modify files, execute arbitrary code in kernels, and open terminals for shell access, effectively compromising the affected system's confidentiality, integrity, and availability.
Mitigation Recommendations
A fix is available in Jupyter Notebook 7.5.6, JupyterLab 4.5.7, and corresponding help-extension packages. Users should upgrade to these versions to remediate the vulnerability. As a workaround, disabling the affected help extensions or setting allowCommandLinker to false in the sanitizer configuration can mitigate the risk until patching is applied.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-09T19:31:56.015Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69fb9bbdcbff5d8610414ea2
Added to database: 05/06/2026, 19:51:25 UTC
Last enriched: 05/14/2026, 03:46:16 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 121
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.