CVE-2024-43805 HTML injection in Jupyter Notebook and JupyterLab leading to DOM Clobbering

High 7.6 Published Updated

Attackers can inject HTML via malicious notebooks to access user data and perform actions as the victim.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-43805?

CVE-2024-43805 is a high-severity cross-site scripting vulnerability in jupyterlab, published on 28 Aug 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

jupyterlab is an extensible environment for interactive and reproducible computing, based on the Jupyter Notebook Architecture. This vulnerability depends on user interaction by opening a malicious notebook with Markdown cells, or Markdown file using JupyterLab preview feature. A malicious user can access any data that the attacked user has access to as well as perform arbitrary requests acting as the attacked user. JupyterLab v3.6.8, v4.2.5 and Jupyter Notebook v7.2.2 have been patched to resolve this issue. Users are advised to upgrade. There is no workaround for the underlying DOM Clobbering susceptibility. However, select plugins can be disabled on deployments which cannot update in a timely fashion to minimise the risk. These are: 1. `@jupyterlab/mathjax-extension:plugin` - users will loose ability to preview mathematical equations. 2. `@jupyterlab/markdownviewer-extension:plugin` - users will loose ability to open Markdown previews. 3. `@jupyterlab/mathjax2-extension:plugin` (if installed with optional `jupyterlab-mathjax2` package) - an older version of the mathjax plugin for JupyterLab 4.x. To disable these extensions run: ```jupyter labextension disable @jupyterlab/markdownviewer-extension:plugin && jupyter labextension disable @jupyterlab/mathjax-extension:plugin && jupyter labextension disable @jupyterlab/mathjax2-extension:plugin ``` in bash.

Weakness: CWE-79

Which versions are affected by CVE-2024-43805?

11 open source packages ship an affected version, including jupyterlab, jupyter-base-notebook and jupyter-notebook. It affects 2 products.

PackageAffectedFixed in
jupyterlab BitnamiAll versions4.2.5
jupyterlab PyPIAll versions3.6.8, 4.2.5
jupyterlab PyPIAll versions3.6.8
jupyterlab PyPIAll versions3.6.8
jupyterlab PyPIFrom 4.0.04.2.5
jupyterlab PyPIFrom 4.0.04.2.5
5 more packages
jupyter-base-notebook BitnamiFrom 7.0.0None
jupyter-notebook BitnamiFrom 7.0.07.2.2
notebook PyPIFrom 7.0.07.2.2
notebook PyPIFrom 7.0.07.2.2
notebook PyPIFrom 7.0.07.2.2
Linux distribution packages (4)
python-jupyterlab SUSE:Package Hub 15 SP5All versions2.2.10-bp156.3.3.1
python-jupyterlab SUSE:Package Hub 15 SP6All versions2.2.10-bp156.3.3.1
python-jupyterlab openSUSE:Leap 15.5All versions2.2.10-bp156.3.3.1
python-jupyterlab openSUSE:Leap 15.6All versions2.2.10-bp156.3.3.1

Products include Jupyter Jupyterlab, Jupyter Notebook.

How do I fix CVE-2024-43805?

Upgrade jupyterlab to a fixed version for your release line: 4.2.5 or 3.6.8.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2024-43805 being exploited?

There is no known exploitation of CVE-2024-43805 in the wild and no public exploit code.

Sources

Also known as BIT-jupyter-base-notebook-2024-43805, BIT-jupyter-notebook-2024-43805, BIT-jupyterlab-2024-43805, DEBIAN-CVE-2024-43805, GHSA-9q39-rmj3-p4r2, PYSEC-2026-1481 and 3 more.

Is CVE-2024-43805 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free