CVE-2025-59842
Executive Summary
CVE-2025-59842 is a low-severity vulnerability in JupyterLab (versions prior to 4.4.8) and Jupyter Notebook, involving missing noopener attribute on links generated by LaTeX typesetters in Markdown content. This omission could theoretically allow reverse tabnabbing attacks if a user clicks on a LaTeX-generated link that opens in a new tab (target="_blank"). In practice, no known third-party LaTeX-rendering extensions that set target="_blank" exist, and default installations are unaffected. The vulnerability has been patched in JupyterLab 4.4.8.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
JupyterLab is distributed via PyPI (jupyterlab package). Users should update to version 4.4.8 or later using pip install --upgrade jupyterlab. The vulnerability does not affect the core Jupyter Notebook package directly, but users of Jupyter Notebook with LaTeX rendering extensions should verify their setup.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (NVD) / 3.1 (Calculated)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required (clicking a link)
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: Low (potential phishing/malicious redirect)
- Availability Impact: None
- Threat Level: Low – Exploitation requires user interaction and a specific, unlikely configuration (third-party LaTeX extension with
target="_blank").
Deep Dive & Mechanics
The vulnerability resides in how JupyterLab and Jupyter Notebook handle links generated by LaTeX typesetters within Markdown cells or files. When a user writes LaTeX code that produces a hyperlink (e.g., \href{https://example.com}{text}), the rendered HTML link does not include the rel="noopener noreferrer" attribute. If the link is set to open in a new tab (target="_blank"), the new page can access the window.opener object of the original JupyterLab tab, enabling a reverse tabnabbing attack. This could allow a malicious site to redirect the original tab to a phishing page or perform other UI redressing.
The attack scenario requires:
- A user has a third-party LaTeX-rendering extension that sets
target="_blank"on generated links. - The user clicks on a LaTeX-generated link.
- The linked page contains malicious JavaScript that modifies the original tab's location.
No such extensions are known to exist, and default JupyterLab installations do not set target="_blank on LaTeX links.
Vulnerable vs. Patched Code
Vulnerable (pre-4.4.8):
<!-- LaTeX-generated link without noopener -->
<a href="https://malicious.com" target="_blank">Click me</a>
Patched (4.4.8+):
<!-- LaTeX-generated link with noopener noreferrer -->
<a href="https://malicious.com" target="_blank" rel="noopener noreferrer">Click me</a>
The patch adds rel="noopener noreferrer" to all links generated by LaTeX typesetters, preventing the new tab from accessing window.opener.
Exploitation & Lab Setup
Red Team
Prerequisites:
- JupyterLab version < 4.4.8
- A third-party LaTeX extension that sets
target="_blank"(theoretical; no known extensions exist) - User interaction (clicking the link)
Exploitation Steps:
- Create a Jupyter Notebook with a Markdown cell containing a LaTeX link:
\href{https://attacker.com/exploit}{Click for more info} - Ensure the LaTeX extension renders this with
target="_blank". - Host a malicious page at
https://attacker.com/exploitthat executes:if (window.opener) { window.opener.location = 'https://attacker.com/phishing'; } - When the victim clicks the link, the new tab opens the malicious page, which redirects the original JupyterLab tab to a phishing site.
Note: This attack is theoretical and requires a non-default extension.
Blue Team
Detection:
- Monitor for unusual outbound links from JupyterLab instances.
- Check for third-party LaTeX extensions that modify link behavior.
- Review server logs for
Refererheaders indicating tabnabbing attempts.
Prevention:
- Update JupyterLab to version 4.4.8 or later.
- Restrict installation of third-party extensions.
- Use Content Security Policy (CSP) headers to limit
window.openeraccess.
Indicators of Compromise (IOCs)
- Network: Outbound connections from JupyterLab to unknown domains with
Refererheader pointing to JupyterLab URL. - File: Presence of third-party LaTeX extensions in
~/.jupyter/lab/user-settings/or~/.jupyter/lab/extensions/. - Behavior: Unexpected redirects of JupyterLab tabs after clicking LaTeX-generated links.
Detection Engineering
YARA Rule
rule CVE_2025_59842_LaTeX_Noopener {
meta:
description = "Detects missing noopener attribute in LaTeX-generated links in JupyterLab"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-59842"
strings:
$latex_href = /\bhref\{[^}]+\}\{[^}]+\}/ nocase
$target_blank = /target\s*=\s*["']_blank["']/ nocase
$noopener = /rel\s*=\s*["'][^"']*noopener[^"']*["']/ nocase
condition:
$latex_href and $target_blank and not $noopener
}
Sigma Rule
title: CVE-2025-59842 - Missing noopener in LaTeX Links
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects JupyterLab versions with missing noopener attribute on LaTeX-generated links
author: Valters IT
date: 2025-04-10
logsource:
product: jupyterlab
service: notebook
detection:
selection:
version|version_lt: '4.4.8'
condition: selection
falsepositives:
- Custom extensions that intentionally omit noopener
level: low
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-59842 - Potential Reverse Tabnabbing via LaTeX Link"; flow:to_server,established; content:"Referer"; http_header; content:"jupyter"; http_header; nocase; pcre:"/href=\{https?:\/\/[^}]+\}\{[^}]+\}/"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate:
- Update JupyterLab to version 4.4.8 or later:
pip install --upgrade jupyterlab - Verify the update:
jupyter lab --version
Long-term:
- Implement Content Security Policy (CSP) headers to restrict
window.openeraccess. - Audit all third-party JupyterLab extensions for security best practices.
- Educate users about the risks of clicking links in untrusted notebooks.
Workarounds:
- Disable LaTeX rendering in Markdown cells if not needed.
- Use a browser extension that enforces
rel="noopener"on all links.
Valters IT
Securing Digital Frontiers