CVE-2025-59842 Overview
CVE-2025-59842 affects JupyterLab, an extensible environment for interactive and reproducible computing based on the Jupyter Notebook architecture. Prior to version 4.4.8, links generated with LaTeX typesetters inside Markdown files and Markdown cells omitted the noopener attribute. The issue is classified under [CWE-1022] Use of Web Link to Untrusted Target with Window Opener.
Default installations are not impacted. The theoretical risk applies to users of third-party LaTeX-rendering extensions that emit links using target=_blank. No such extensions were known at time of writing. The maintainers patched the issue in version 4.4.8.
Critical Impact
Users of third-party LaTeX rendering extensions could be exposed to reverse tabnabbing if attacker-controlled Markdown or notebook content generated LaTeX links opened in new tabs.
Affected Products
- JupyterLab versions prior to 4.4.8
- Jupyter Notebook (Markdown rendering path shared with JupyterLab)
- Third-party LaTeX-rendering extensions emitting target=_blank links
Discovery Timeline
- 2025-09-26 - CVE-2025-59842 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-59842
Vulnerability Analysis
The vulnerability is a reverse tabnabbing weakness in the way JupyterLab renders LaTeX-generated hyperlinks within Markdown content. When a link opens in a new browsing context via target=_blank, browsers historically expose the originating page through the window.opener reference unless the anchor also includes rel="noopener". A malicious destination page can then rewrite window.opener.location to a phishing page that mimics the JupyterLab UI.
Because default JupyterLab installations do not render LaTeX links with target=_blank, the practical exposure is limited to environments that install third-party LaTeX-rendering extensions with that behavior. The issue is tracked in GitHub Security Advisory GHSA-vvfj-2jqx-52jm.
Root Cause
The LaTeX typesetter output path did not append rel="noopener" (or noreferrer) to anchor elements it generated. Combined with an extension-supplied target=_blank, this left window.opener populated on the destination page.
Attack Vector
An attacker crafts a Markdown cell or file containing a LaTeX construct that produces a hyperlink to an attacker-controlled origin. A victim opens the notebook in a vulnerable JupyterLab instance and clicks the rendered link. The destination page uses window.opener.location to redirect the original tab, enabling phishing.
// Patch scaffolding introduced alongside the fix in JupyterLab 4.4.8
// packages/mathjax-extension/babel.config.js
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/
module.exports = require('@jupyterlab/testing/lib/babel-config');
Source: jupyterlab commit 88ef373
// packages/mathjax-extension/jest.config.js
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/
const func = require('@jupyterlab/testing/lib/jest-config');
module.exports = func(__dirname);
Source: jupyterlab commit 88ef373
Detection Methods for CVE-2025-59842
Indicators of Compromise
- Rendered anchor tags emitted by LaTeX/MathJax extensions that contain target="_blank" without rel="noopener" or rel="noreferrer".
- Unexpected redirects of the JupyterLab tab immediately after a user clicks a math-rendered link.
- Notebooks or Markdown files sourced from untrusted repositories that embed LaTeX hyperlinks pointing to external domains.
Detection Strategies
- Inventory installed JupyterLab extensions and identify any third-party LaTeX/MathJax renderer that injects target=_blank into generated anchors.
- Grep notebook and Markdown corpora for LaTeX link constructs such as \href{...} referencing external hosts.
- Audit browser proxy or web gateway logs for outbound clicks from JupyterLab origins followed by redirects to lookalike domains.
Monitoring Recommendations
- Alert on JupyterLab servers running versions below 4.4.8 through software composition analysis.
- Monitor extension installation events on shared Jupyter environments and flag renderers that modify anchor generation.
- Log user navigation from JupyterLab tabs to newly registered or low-reputation external domains.
How to Mitigate CVE-2025-59842
Immediate Actions Required
- Upgrade JupyterLab and Jupyter Notebook installations to version 4.4.8 or later.
- Review installed third-party LaTeX or MathJax extensions and disable any that emit target=_blank without rel="noopener".
- Instruct notebook users to avoid clicking LaTeX-rendered links in notebooks received from untrusted sources.
Patch Information
The fix ships in JupyterLab 4.4.8. See the upstream fix in jupyterlab commit 88ef373 and the GitHub Security Advisory GHSA-vvfj-2jqx-52jm for full details.
Workarounds
- Uninstall or pin to safe versions of third-party LaTeX-rendering extensions that add target=_blank to generated links.
- Configure a browser policy or Content Security Policy that restricts navigation initiated from window.opener.
- Serve JupyterLab behind a reverse proxy that rewrites outbound anchor tags to include rel="noopener noreferrer".
# Upgrade JupyterLab to the patched release
pip install --upgrade "jupyterlab>=4.4.8"
# Verify the installed version
jupyter lab --version
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

