VAITP Dataset

← Back to the dataset

CVE-2026-102904

PyPI Extension Manager lets authenticated users pass pip options in uninstall, enabling file read or internal URL fetch.

  • CVSS 5.4
  • CWE-88
  • Input Validation and Sanitization
  • Remote

JupyterLab is an extensible environment for interactive and reproducible computing, based on the Jupyter Notebook Architecture. From JupyterLab 4.0.0 until 4.5.11 and 4.6.4, the PyPI Extension Manager uninstall request reaches ExtensionHandler.post, which validates extension names for installation but passes uninstall names to PyPIExtensionManager.uninstall and python -m pip uninstall without rejecting option-like values. The security impact requires that the PyPI Extension Manager is enabled, the account can call the extension API, and kernels and terminals are disabled or delegated to remote hosts; otherwise the user can already read files and make outbound requests directly. An authenticated user with extension API access can supply a pip requirements option to make the server read a local file or fetch an internal URL, and reflected parse errors can return the first unparsable line or response content. A pip log option can also create or corrupt a chosen path with pip-generated log text, but the requester cannot select an arbitrary disclosed line or arbitrary file content, and the injection does not add code execution or availability impact beyond ordinary package removal. This issue is fixed in JupyterLab 4.5.11 and 4.6.4.

CVSS base score
5.4
Published
2026-09-29
OWASP
A03 Injection
Orthogonal defect classification
Checking
Code defect classification
Missing Check
Category
Input Validation and Sanitization
Subcategory
Insecure Parsing or Deserialization
Accessibility scope
Remote
Impact
Information Disclosure
Affected component
JupyterLab
Fixed by upgrading
Yes

Solution

Upgrade JupyterLab to version 4.5.11 (or later, e.g., 4.6.4).

Vulnerable code sample

import subprocess
import re

def uninstall_extension(ext_name: str) -> None:
    """Uninstall a JupyterLab PyPI extension."""
    # VULNERABLE: passes option-like values directly to pip uninstall
    subprocess.run(
        ["python", "-m", "pip", "uninstall", "-y", ext_name],
        check=False,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
    )

Patched code sample

import subprocess
import re

def uninstall_extension(ext_name: str) -> None:
    """Uninstall a JupyterLab PyPI extension."""
    # FIX: reject option-like values before invoking pip
    if ext_name.startswith("-"):
        raise ValueError("Extension name must not start with '-'")
    if not re.fullmatch(r"[A-Za-z0-9_.-]+", ext_name):
        raise ValueError("Invalid characters in extension name")
    subprocess.run(
        ["python", "-m", "pip", "uninstall", "-y", ext_name],
        check=False,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
    )

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

  • Fix for GHSA-3325-v43h-43rv (jupyterlab/jupyterlab)
    jupyterlab/extensions/manager.py, jupyterlab/extensions/pypi.py · PyPIExtensionManager.is_install_allowed
  • Fix for GHSA-3325-v43h-43rv (jupyterlab/jupyterlab)
    jupyterlab/extensions/manager.py, jupyterlab/extensions/pypi.py, jupyterlab/extensions/pypi.py · PyPIExtensionManager.is_install_allowed, jupyterlab/extensions/pypi.py · PyPIExtensionManager.uninstall, jupyterlab/handlers/extension_manager_handler.py · ExtensionHandler.post
  • Fix for GHSA-3325-v43h-43rv (jupyterlab/jupyterlab)
    jupyterlab/extensions/manager.py, jupyterlab/extensions/pypi.py · PyPIExtensionManager.uninstall

Cite this entry

@misc{vaitp:cve2026102904,
  title        = {{PyPI Extension Manager lets authenticated users pass pip options in uninstall, enabling file read or internal URL fetch.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-102904},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-102904/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.