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

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

- **Severity:** High 7.6 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L`)
- **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:** Yes
- **Published:** 28 Aug 2024
- **Updated:** 28 Aug 2024
- **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, PYSEC-2026-2536, UBUNTU-CVE-2024-43805, openSUSE-SU-2024:0352-1

## 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 (Improper Neutralization of Input During Web Page Generation)

## 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.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `jupyterlab` | Bitnami | All versions | 4.2.5 |
| `jupyterlab` | PyPI | All versions | 3.6.8, 4.2.5 |
| `jupyterlab` | PyPI | All versions | 3.6.8 |
| `jupyterlab` | PyPI | All versions | 3.6.8 |
| `jupyterlab` | PyPI | From 4.0.0 | 4.2.5 |
| `jupyterlab` | PyPI | From 4.0.0 | 4.2.5 |
| `jupyter-base-notebook` | Bitnami | From 7.0.0 | None |
| `jupyter-notebook` | Bitnami | From 7.0.0 | 7.2.2 |
| `notebook` | PyPI | From 7.0.0 | 7.2.2 |
| `notebook` | PyPI | From 7.0.0 | 7.2.2 |
| `notebook` | PyPI | From 7.0.0 | 7.2.2 |
| `python-jupyterlab` | SUSE:Package Hub 15 SP5 | All versions | 2.2.10-bp156.3.3.1 |
| `python-jupyterlab` | SUSE:Package Hub 15 SP6 | All versions | 2.2.10-bp156.3.3.1 |
| `python-jupyterlab` | openSUSE:Leap 15.5 | All versions | 2.2.10-bp156.3.3.1 |
| `python-jupyterlab` | openSUSE:Leap 15.6 | All versions | 2.2.10-bp156.3.3.1 |

Products: 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.

## Is CVE-2024-43805 being exploited?

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

## Other vulnerabilities in jupyterlab

- [CVE-2024-39700](https://insights.sbomify.com/CVE-2024-39700/): Remote Code Execution (RCE) vulnerability in jupyterlab extension template `update-integration-tests` GitHub Action (critical 10.0)
- [CVE-2026-42266](https://insights.sbomify.com/CVE-2026-42266/): JupyterLab has an Extension Manager API/GUI Policy Discrepancy, allowing 3rd party (malicious) extensions install via POST request (high 8.8)
- [CVE-2026-42557](https://insights.sbomify.com/CVE-2026-42557/): jupyterlab: Command linker attributes in HTML enable one-click command execution from untrusted content (high 8.6)
- [CVE-2021-32797](https://insights.sbomify.com/CVE-2021-32797/): JupyterLab: XSS due to lack of sanitization of the action attribute of an html <form> (high 7.4)
- [CVE-2025-59842](https://insights.sbomify.com/CVE-2025-59842/): JupyterLab LaTeX typesetter links did not enforce `noopener` attribute (low 2.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-43805 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2024-43805 in the wild and no public exploit code.

Affected packages and fixed versions:
- jupyterlab (Bitnami): affected all versions; fixed in 4.2.5
- jupyterlab (PyPI): affected all versions; fixed in 3.6.8, 4.2.5
- jupyterlab (PyPI): affected all versions; fixed in 3.6.8
- jupyterlab (PyPI): affected all versions; fixed in 3.6.8
- jupyterlab (PyPI): affected from 4.0.0; fixed in 4.2.5
- jupyterlab (PyPI): affected from 4.0.0; fixed in 4.2.5
- jupyter-base-notebook (Bitnami): affected from 7.0.0; no fix listed
- jupyter-notebook (Bitnami): affected from 7.0.0; fixed in 7.2.2
- notebook (PyPI): affected from 7.0.0; fixed in 7.2.2
- notebook (PyPI): affected from 7.0.0; fixed in 7.2.2
- notebook (PyPI): affected from 7.0.0; fixed in 7.2.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-43805/ (Markdown: https://insights.sbomify.com/CVE-2024-43805/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-43805
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-43805
- OSV: https://osv.dev/vulnerability/CVE-2024-43805

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-43805/
Summaries are generated and may contain mistakes; the official description above is the record.
