GHSA-jwrc-gm9j-263p

Suggest an improvement
Source
https://github.com/advisories/GHSA-jwrc-gm9j-263p
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-jwrc-gm9j-263p/GHSA-jwrc-gm9j-263p.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-jwrc-gm9j-263p
Aliases
Published
2026-10-15T20:22:13Z
Modified
2026-10-15T20:30:07Z
Severity
  • 4.2 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N CVSS Calculator
Summary
JupyterLab: Command link trust prompt in JupyterLab can trust a document other than the one clicked
Details

Description

A Markdown file or a notebook output can carry a button that runs a JupyterLab command. Since 4.5.7 the first click on such a button opens a prompt naming the command, with Cancel, Run Once and Trust. Choosing Trust runs the command and marks the document trusted, so its later buttons run without a prompt.

Which document gets marked is decided when the user answers, not when they click. Both trust commands read whichever document is current at that moment: markdownviewer:trust uses tracker.currentWidget, and notebook:trust uses the equivalent lookup. If another document becomes current while the prompt is open, that document is the one marked trusted, and the one the user was looking at stays untrusted.

Users are affected if all of the following are true:

  • they run JupyterLab 4.5.7 through 4.6.3, or an application that bundles it such as Notebook 7.5+;
  • they open a Markdown file or notebook from someone else and click a button in it;
  • they answer Trust rather than Cancel or Run Once; and
  • a second document becomes the current one while the prompt is open, for example through a workspace restoring at startup, an extension activating a widget, or a command that opens a file

Impact

The user loses control over which document they trusted. Every button in the document that was (incorrectly) marked as trusted runs from then on without a prompt, so if that document also came from an untrusted source, its buttons fire on a single click with no confirmation. That is the state the prompt was added to prevent, in GHSA-mqcg-5x36-vfcg.

The command that ran had the user's consent, because the prompt named it and they pressed Trust. The document they were reading stays untrusted, so it prompts again on the next click.

Notebooks are written to disk

When the document marked is a notebook, the effect outlives the browser session. notebook:trust marks every cell trusted and then saves the file, which results in the server signing it, so the notebook stays trusted when it is next opened. The save also writes out any unsaved edits in that notebook. A second confirmation appears first, but it says only that a trusted notebook may execute hidden code, without naming the file, so it does not show the user which notebook is about to be trusted.

A Markdown preview marked this way stays trusted only until it is closed. Nothing is written to disk.

Patches

JupyterLab v4.6.4 and v4.5.11 contain the patch. The trust request now carries the document that was clicked, and the command is run only once that same document has been marked.

Users of applications that depend on JupyterLab, such as Notebook v7+, should update jupyterlab package too.

Workarounds

Given the high complexity of a potential exploit, we advise treating this as a defense in-depth and update at earliest opportunity, rather than apply the workarounds listed below. However, for users running in highly sensitive environments who are unable to upgrade the workarounds are included below.

Turn off command linker, which removes the ability to execute frontend commands altogether:

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

In such configuration the buttons in Markdown files and notebook outputs then do nothing when clicked. Documentation and extensions that use command links for navigation stop working, and the setting applies to every document, not only untrusted ones.

If disabling that setting is not desirable and update is not possible, advise users to choose "Run Once" rather than "Trust". "Run Once" makes the command run but no document is marked, so nothing can be trusted in error.

Database specific
{
    "cwe_ids":  [
        "CWE-367",
        "CWE-863"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-10-15T20:22:13Z",
    "nvd_published_at":  "2026-10-13T16:17:09Z",
    "severity":  "MODERATE"
}
References

Affected packages

PyPI / jupyterlab

Package

Name
jupyterlab
View open source insights on deps.dev
Purl
pkg:pypi/jupyterlab

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.6.0
Fixed
4.6.4

Affected versions

4.*
4.6.0
4.6.1
4.6.2
4.6.3

Database specific

last_known_affected_version_range
"<= 4.6.3"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-jwrc-gm9j-263p/GHSA-jwrc-gm9j-263p.json"

PyPI / jupyterlab

Package

Name
jupyterlab
View open source insights on deps.dev
Purl
pkg:pypi/jupyterlab

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.5.7
Fixed
4.5.11

Affected versions

4.*
4.5.7
4.5.8
4.5.9
4.5.10

Database specific

last_known_affected_version_range
"<= 4.5.10"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-jwrc-gm9j-263p/GHSA-jwrc-gm9j-263p.json"

PyPI / notebook

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
7.5.6
Fixed
7.6.3

Affected versions

7.*
7.5.6
7.5.7
7.5.8
7.6.0a0
7.6.0a1
7.6.0a2
7.6.0a3
7.6.0a4
7.6.0a5
7.6.0b0
7.6.0b1
7.6.0rc0
7.6.0rc1
7.6.0
7.6.1
7.6.2

Database specific

last_known_affected_version_range
"<= 7.6.2"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-jwrc-gm9j-263p/GHSA-jwrc-gm9j-263p.json"

PyPI / jupyterlite-core

Package

Name
jupyterlite-core
View open source insights on deps.dev
Purl
pkg:pypi/jupyterlite-core

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0.7.5
Fixed
0.8.4

Affected versions

0.*
0.7.5
0.7.6
0.8.0a0
0.8.0a1
0.8.0a2
0.8.0b0
0.8.0b1
0.8.0rc0
0.8.0
0.8.1
0.8.2
0.8.3

Database specific

last_known_affected_version_range
"<= 0.8.3"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-jwrc-gm9j-263p/GHSA-jwrc-gm9j-263p.json"