Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2024-43805

CVE-2024-43805: Jupyter JupyterLab XSS Vulnerability

CVE-2024-43805 is a cross-site scripting flaw in Jupyter JupyterLab triggered by opening malicious Markdown content. Attackers can access user data and perform unauthorized actions. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

CVE-2024-43805 Overview

CVE-2024-43805 is a Cross-Site Scripting (XSS) vulnerability affecting JupyterLab and Jupyter Notebook, rooted in a DOM Clobbering weakness [CWE-79]. The flaw is triggered when a user opens a malicious notebook containing Markdown cells or previews a malicious Markdown file using the JupyterLab preview feature. A successful attack allows a malicious actor to access any data available to the victim and issue arbitrary requests while impersonating that user within the JupyterLab session. The vulnerability was patched in JupyterLab v3.6.8, v4.2.5, and Jupyter Notebook v7.2.2.

Critical Impact

Attackers can execute script in the victim's browser session, exfiltrate data accessible to the user, and perform authenticated actions against the Jupyter server on the victim's behalf.

Affected Products

  • JupyterLab versions prior to 3.6.8
  • JupyterLab 4.x versions prior to 4.2.5
  • Jupyter Notebook versions prior to 7.2.2

Discovery Timeline

  • 2024-08-28 - CVE-2024-43805 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-43805

Vulnerability Analysis

The vulnerability is a DOM-based XSS caused by a DOM Clobbering susceptibility in JupyterLab's Markdown rendering pipeline. DOM Clobbering allows an attacker to inject named HTML elements (using id or name attributes) that shadow legitimate JavaScript variables or properties on the document and window objects. When JupyterLab renders untrusted Markdown containing crafted HTML, the clobbered references are consumed by rendering logic, leading to script execution in the origin of the JupyterLab session.

Exploitation requires user interaction: the victim must open a malicious notebook with Markdown cells or preview a malicious Markdown file. Because the payload executes in the authenticated JupyterLab context, the attacker inherits the victim's session and can call the Jupyter server API, read notebook contents, and manipulate kernels.

Root Cause

The underlying cause is unsafe consumption of DOM lookups within Markdown-rendering extensions, specifically @jupyterlab/mathjax-extension:plugin, @jupyterlab/markdownviewer-extension:plugin, and the optional @jupyterlab/mathjax2-extension:plugin. These plugins rely on properties that can be overridden by attacker-controlled HTML elements embedded in Markdown content.

Attack Vector

The attack is network-reachable but requires user interaction. An attacker distributes a malicious .ipynb or .md file, for example through a shared repository, a data science collaboration channel, or a supply-chain compromise of a notebook source. When the target opens the notebook or previews the Markdown file in JupyterLab, the clobbering payload executes and the scope changes to include other JupyterLab components. See the JupyterLab Security Advisory GHSA-9q39-rmj3-p4r2 for further technical details.

// No verified public proof-of-concept code is available.
// The vulnerability manifests when Markdown-rendering extensions
// consume DOM properties that attacker-injected HTML elements clobber
// via id/name attributes, leading to script execution in the JupyterLab origin.

Detection Methods for CVE-2024-43805

Indicators of Compromise

  • Notebooks or Markdown files containing HTML elements with suspicious id or name attributes that shadow known JavaScript identifiers such as document.currentScript or plugin-specific globals.
  • Unexpected outbound HTTP requests from a user's browser to attacker-controlled hosts originating from the JupyterLab origin.
  • Unusual Jupyter server API calls (kernel creation, file reads, session enumeration) that do not correlate with user activity.

Detection Strategies

  • Inventory JupyterLab and Jupyter Notebook installations and compare deployed versions against patched versions 3.6.8, 4.2.5, and 7.2.2.
  • Scan notebook repositories and shared storage for Markdown cells containing embedded HTML with id/name attributes targeting DOM properties.
  • Correlate browser telemetry with Jupyter server access logs to identify session activity that does not match interactive user behavior.

Monitoring Recommendations

  • Log and review Jupyter server API access patterns for authenticated sessions, focusing on unusual file access or kernel activity.
  • Monitor egress traffic from workstations running JupyterLab for connections to unrecognized domains during notebook sessions.
  • Track deployment of Jupyter extensions and alert on the presence of the vulnerable plugins on unpatched hosts.

How to Mitigate CVE-2024-43805

Immediate Actions Required

  • Upgrade JupyterLab to 3.6.8 or 4.2.5 and Jupyter Notebook to 7.2.2 as soon as possible.
  • Audit shared notebook sources and repositories for untrusted Markdown content before opening in vulnerable versions.
  • Restrict who can share and open notebooks on multi-user JupyterHub deployments until patching completes.

Patch Information

The Jupyter project addressed the DOM Clobbering issue in JupyterLab 3.6.8, JupyterLab 4.2.5, and Jupyter Notebook 7.2.2. Patch details and impacted plugins are documented in the JupyterLab Security Advisory GHSA-9q39-rmj3-p4r2.

Workarounds

  • There is no workaround for the underlying DOM Clobbering weakness itself; upgrade is required for full remediation.
  • On deployments that cannot upgrade immediately, disable the affected plugins to reduce risk. Users will lose the ability to preview mathematical equations and Markdown files.
  • Disable @jupyterlab/markdownviewer-extension:plugin, @jupyterlab/mathjax-extension:plugin, and (if installed) @jupyterlab/mathjax2-extension:plugin.
bash
# Disable vulnerable extensions on unpatched JupyterLab deployments
jupyter labextension disable @jupyterlab/markdownviewer-extension:plugin \
  && jupyter labextension disable @jupyterlab/mathjax-extension:plugin \
  && jupyter labextension disable @jupyterlab/mathjax2-extension:plugin

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.