GitHub advisory · PyPI
JupyterLab: Command link trust prompt in JupyterLab can trust a document other than the one clicked
PyPI
What it fixes
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:
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.
When the document marked is a notebook, the effect outlives the browser session. notebook:trust marks every…
Manual fix · PyPI
pip install --upgrade "jupyterlab>=4.5.11"pip install --upgrade "jupyterlite-core>=0.8.4"pip install --upgrade "notebook>=7.6.3"Sources