Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.5%top 61%

CVE-2026-40171: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in jupyter notebook

0
High
VulnerabilityCVE-2026-40171cvecve-2026-40171cwe-79
Published: 05/06/2026 (05/06/2026, 19:36:32 UTC)
Source: CVE Database V5
Vendor/Project: jupyter
Product: 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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
High
User Interaction
Active
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected software

notebook
pkg:pypi/notebook
Affected versions
>=7.0.0 <=7.5.5
jupyterlab
pkg:pypi/jupyterlab
Affected versions
<=4.5.6

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 05/14/2026, 03:46:16 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses