# CVE-2024-39700: Remote Code Execution (RCE) vulnerability in jupyterlab extension template `update-integration-tests` GitHub Action

> Remote code execution in JupyterLab extension template's GitHub Action allows attackers to execute arbitrary code via malicious pull requests.

- **Severity:** Critical 10.0 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Jul 2024
- **Updated:** 16 Aug 2024
- **Also known as:** BIT-jupyterlab-2024-39700, GHSA-45gq-v5wm-82wg, PYSEC-2024-322

## What is CVE-2024-39700?

CVE-2024-39700 is a critical code injection vulnerability in jupyterlab extension-template, published on 16 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

JupyterLab extension template is a  `copier` template for JupyterLab extensions. Repositories created using this template with `test` option include `update-integration-tests.yml` workflow which has an RCE vulnerability. Extension authors hosting their code on GitHub are urged to upgrade the template to the latest version. Users who made changes to `update-integration-tests.yml`, accept overwriting of this file and re-apply your changes later. Users may wish to temporarily disable GitHub Actions while working on the upgrade. We recommend rebasing all open pull requests from untrusted users as actions may run using the version from the `main` branch at the time when the pull request was created. Users who are upgrading from template version prior to 4.3.0 may wish to leave out proposed changes to the release workflow for now as it requires additional configuration.

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2024-39700?

2 open source packages ship an affected version, including jupyterlab. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `jupyterlab` | Bitnami | All versions | 4.3.0 |
| `jupyterlab` | PyPI | All versions | 4.3.0 |

Products: Jupyter Jupyterlab.

## How do I fix CVE-2024-39700?

Upgrade jupyterlab to 4.3.0 or later.

## Is CVE-2024-39700 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-39700 exists.

Public exploit code:

- CVE-2024-39700 Proof of Concept (github_poc): https://github.com/LOURC0D3/CVE-2024-39700-PoC
- Authorized security-research lab reproducing CVE-2024-39700 / GHSA-45gq-v5wm-82wg (JupyterLab extension-template update-integration-tests pwn request) (github_poc): https://github.com/pvharmo2/gha-lab-0ba60e6456

## Other vulnerabilities in jupyterlab extension-template

- [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-2024-43805](https://insights.sbomify.com/CVE-2024-43805/): HTML injection in Jupyter Notebook and JupyterLab leading to DOM Clobbering (high 7.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-39700 and fix it if it is affected.

What it is: CVE-2024-39700 is a critical code injection vulnerability in jupyterlab extension-template, published on 16 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-39700 exists.

Affected packages and fixed versions:
- jupyterlab (Bitnami): affected all versions; fixed in 4.3.0
- jupyterlab (PyPI): affected all versions; fixed in 4.3.0

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-39700/ (Markdown: https://insights.sbomify.com/CVE-2024-39700/index.md)
```

## Sources

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

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