cve.bz

CVE-2026-40171 Cross-site Scripting

8.4 highEPSS 0.5%Fix available

High (8.4). EPSS 0.5% estimated probability of exploitation activity in the next 30 days. Fixed in @jupyter-notebook/help-extension 7.5.6.

On this page
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.

Severity

CVSS 4.0

8.4 high
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
EPSS
0.5% (unchanged from 0.5% a week ago; 0.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 42nd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-05-07. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-79 Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Fix and patched versions

  • @jupyter-notebook/help-extension (npm): fixed in 7.5.6
  • notebook (PyPI): fixed in 7.5.6
  • jupyterlab (PyPI): fixed in 4.5.7
  • @jupyterlab/help-extension (npm): fixed in 4.5.7
  • Debian, openSUSE, Alpine: fixed package versions per release

Ask an AI about this CVE

Show the promptExplain CVE-2026-40171 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-40171?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-40171?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-40171 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
jupyter notebook>=7.0.0, <= 7.5.5
jupyterlab help-extension<=4.5.6
jupyterlab<= 4.5.6
jupyter-notebook help-extension>=7.0.0,<= 7.5.5

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-rch3-82jr-f9w9npm@jupyter-notebook/help-extension>=7.0.0 <7.5.67.5.6
GHSA-rch3-82jr-f9w9PyPInotebook>=7.0.0 <7.5.67.5.6
GHSA-rch3-82jr-f9w9PyPIjupyterlab<4.5.74.5.7
GHSA-rch3-82jr-f9w9npm@jupyterlab/help-extension<4.5.74.5.7
PYSEC-2026-2538PyPIjupyterlab<4.5.74.5.7
PYSEC-2026-2682PyPInotebook>=7.0.0 <7.5.67.5.6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian13jupyterlabno fix listedDEBIAN-CVE-2026-40171
Debian14jupyter-notebook7.4.7-3DEBIAN-CVE-2026-40171
Debian14jupyterlab4.4.10+ds1+~3.1.0+~0.16.6+~cs1.4.4-3DEBIAN-CVE-2026-40171
Ubuntu25.10, 26.10jupyter-notebookno fix listedUBUNTU-CVE-2026-40171
openSUSETumbleweedpython-jupyterlab4.5.7-1.1openSUSE-SU-2026:10748-1
openSUSETumbleweedpython-notebook7.5.6-1.1openSUSE-SU-2026:10749-1
Alpinev3.24jupyter-notebook7.5.6-r0ALPINE-CVE-2026-40171

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This is an Important flaw in Jupyter Notebook and JupyterLab, enabling a stored cross-site scripting (XSS) attack. An attacker can craft a malicious notebook that, with a single user click, can steal authentication tokens and fully compromise the Jupyter session, leading to arbitrary code execution and information disclosure. This impacts Red Hat OpenShift AI and Migration Toolkit for Applications.

Red Hat's mitigation

To reduce the risk of exploitation, disable the affected help extensions in Jupyter Notebook and JupyterLab, or set the `allowCommandLinker` option to `false` within the sanitizer configuration. Consult the Jupyter documentation for specific instructions on modifying these settings. Disabling these features may affect the availability of certain help functionalities.

ProductPackageStateAdvisory
Red Hat Migration Toolkit for Applications 8.2mta/mta-solution-server-rhel9:1784109883Fixed 2026-07-21RHSA-2026:43038
Red Hat OpenShift AI 2.25rhoai/odh-workbench-jupyter-datascience-cpu-py312-rhel9:1788315638Fixed 2026-09-08RHSA-2026:65126
Red Hat OpenShift AI 2.25rhoai/odh-workbench-jupyter-minimal-cpu-py312-rhel9:1788185839Fixed 2026-09-08RHSA-2026:65126
Red Hat OpenShift AI 2.25rhoai/odh-workbench-jupyter-minimal-cuda-py312-rhel9:1788185798Fixed 2026-09-08RHSA-2026:65126
Red Hat OpenShift AI 2.25rhoai/odh-workbench-jupyter-minimal-rocm-py312-rhel9:1788185733Fixed 2026-09-08RHSA-2026:65126
Red Hat OpenShift AI 2.25rhoai/odh-workbench-jupyter-pytorch-cuda-py312-rhel9:1788185436Fixed 2026-09-08RHSA-2026:65126
Red Hat OpenShift AI 2.25rhoai/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-rhel9:1788185842Fixed 2026-09-08RHSA-2026:65126
Red Hat OpenShift AI 2.25rhoai/odh-workbench-jupyter-pytorch-rocm-py312-rhel9:1788185848Fixed 2026-09-08RHSA-2026:65126
Red Hat OpenShift AI 2.25rhoai/odh-workbench-jupyter-tensorflow-cuda-py312-rhel9:1788186007Fixed 2026-09-08RHSA-2026:65126
Red Hat OpenShift AI 2.25rhoai/odh-workbench-jupyter-tensorflow-rocm-py312-rhel9:1788185846Fixed 2026-09-08RHSA-2026:65126
Red Hat OpenShift AI 2.25rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9:1788185899Fixed 2026-09-08RHSA-2026:65126
Red Hat OpenShift AI 3.4rhoai/odh-th06-cpu-torch210-py312-rhel9:1787076778Fixed 2026-08-27RHSA-2026:60520
Red Hat OpenShift AI 3.4rhoai/odh-th06-cuda130-torch210-py312-rhel9:1787077779Fixed 2026-08-27RHSA-2026:60520
Red Hat OpenShift AI 3.4rhoai/odh-th06-rocm64-torch291-py312-rhel9:1787076481Fixed 2026-08-27RHSA-2026:60520
Red Hat OpenShift AI 3.4rhoai/odh-workbench-jupyter-datascience-cpu-py312-rhel9:1787074331Fixed 2026-08-27RHSA-2026:60520
Red Hat OpenShift AI 3.4rhoai/odh-workbench-jupyter-minimal-cpu-py312-rhel9:1787073913Fixed 2026-08-27RHSA-2026:60520
Red Hat OpenShift AI 3.4rhoai/odh-workbench-jupyter-minimal-cuda-py312-rhel9:1787074078Fixed 2026-08-27RHSA-2026:60520
Red Hat OpenShift AI 3.4rhoai/odh-workbench-jupyter-minimal-rocm-py312-rhel9:1787073929Fixed 2026-08-27RHSA-2026:60520
Red Hat OpenShift AI (RHOAI)rhoai/odh-th06-cpu-torch291-py312-rhel9Not affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-th06-cuda130-torch291-py312-rhel9Not affected
5 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-40171.

Attack patterns (CAPEC)

  • CAPEC-63 Cross-Site Scripting (XSS) Likelihood: High · Severity: Very High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-209 XSS Using MIME Type Mismatch Severity: Medium
  • CAPEC-588 DOM-Based XSS Likelihood: High · Severity: Very High
  • CAPEC-591 Reflected XSS Likelihood: High · Severity: Very High
  • CAPEC-592 Stored XSS Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON