---
id: CVE-2026-40171
aliases:
  - GHSA-rch3-82jr-f9w9
  - BIT-jupyter-base-notebook-2026-40171
  - BIT-jupyter-notebook-2026-40171
  - BIT-jupyterlab-2026-40171
  - PYSEC-2026-2538
  - PYSEC-2026-2682
title: >-
  Jupyter Notebook Vulnerable to Authentication Token Theft via CommandLinker
  XSS
summary: >-
  Jupyter Notebook Vulnerable to Authentication Token Theft via CommandLinker
  XSS
severity: high
cvss: 8.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'
vendor: jupyter-notebook
product: '@jupyter-notebook/help-extension'
ecosystem: npm
affected:
  - '@jupyter-notebook/help-extension >= 7.0.0, < 7.5.6'
  - 'notebook >= 7.0.0, < 7.5.6'
  - jupyterlab < 4.5.7
  - '@jupyterlab/help-extension < 4.5.7'
patched:
  - '@jupyter-notebook/help-extension 7.5.6'
  - notebook 7.5.6
  - jupyterlab 4.5.7
  - '@jupyterlab/help-extension 4.5.7'
published: '2026-04-30'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:51:03.066267538Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-rch3-82jr-f9w9'
references:
  - url: >-
      https://github.com/jupyter/notebook/security/advisories/GHSA-rch3-82jr-f9w9
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-40171'
  - url: 'https://github.com/jupyter/notebook'
  - url: >-
      https://jupyterlab.readthedocs.io/en/latest/user/commands.html#commands-in-markdown-output-and-files
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40171.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-40171'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2467453'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-40171'
  - url: 'https://access.redhat.com/errata/RHSA-2026:43038'
  - url: 'https://access.redhat.com/errata/RHSA-2026:65126'
  - url: 'https://access.redhat.com/errata/RHSA-2026:60520'
tags:
  - osv
  - npm
  - csaf
  - vex
  - red-hat
epss: 0.00476
epssPercentile: 0.40332
cvssSource: vendor
cwe:
  - CWE-79
ingestedAt: '2026-07-13T18:58:02.625Z'
---

## Overview

### Impact

A stored Cross-Site Scripting (XSS) vulnerability in Jupyter Notebook allows attackers to steal authentication tokens from users who open malicious notebook files and interact with elements that the attacker can make look indistinguishable from legitimate controls (single click interaction).

The vulnerability enables complete account takeover through the Jupyter REST API, allowing the attacker to:
1. Read all files
2. Modify/create files
3. Access running kernels and execute arbitrary code
4. Create terminals for shell access

### Patches

Jupyter Notebook 7.5.6 and JupyterLab 4.5.7 include patches for this vulnerability.

### Workarounds

The help extension can be disabled via CLI:

```
jupyter labextension disable @jupyter-notebook/help-extension
jupyter labextension disable @jupyterlab/help-extension
```

### Hardening

The patched versions include a toggle to disable the command linker functionality altogether, for example via `overrides.json`:

```json
{
  "@jupyterlab/apputils-extension:sanitizer": {
    "allowCommandLinker": false
  }
}
```

### Resources

- https://jupyterlab.readthedocs.io/en/latest/user/commands.html#commands-in-markdown-output-and-files

### Acknowledgments

Reported by Daniel Teixeira - NVIDIA AI Red Team

## Affected packages

- `@jupyter-notebook/help-extension >= 7.0.0, < 7.5.6`
- `notebook >= 7.0.0, < 7.5.6`
- `jupyterlab < 4.5.7`
- `@jupyterlab/help-extension < 4.5.7`

## Remediation

Upgrade to a patched release:

- `@jupyter-notebook/help-extension 7.5.6`
- `notebook 7.5.6`
- `jupyterlab 4.5.7`
- `@jupyterlab/help-extension 4.5.7`

## Vendor advisories

- **RHSA-2026:43038** · Red Hat · fixed in: Red Hat Migration Toolkit for Applications 8.2 · released 2026-07-21 · [advisory](https://access.redhat.com/errata/RHSA-2026:43038)
- **RHSA-2026:65126** · Red Hat · fixed in: Red Hat OpenShift AI 2.25 · released 2026-09-08 · [advisory](https://access.redhat.com/errata/RHSA-2026:65126)
- **RHSA-2026:60520** · Red Hat · fixed in: Red Hat OpenShift AI 3.4 · released 2026-08-27 · [advisory](https://access.redhat.com/errata/RHSA-2026:60520)
