Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-102904 Overview
JupyterLab contains an argument injection vulnerability [CWE-88] in the PyPI Extension Manager uninstall handler. The ExtensionHandler.post method validates extension names during installation but forwards uninstall names directly to PyPIExtensionManager.uninstall and python -m pip uninstall without filtering option-like values. An authenticated user with extension API access can supply pip options such as --requirement or --log to read local files, fetch internal URLs, or write attacker-controlled log data to arbitrary paths. The issue affects JupyterLab 4.0.0 through 4.5.10 and 4.6.0 through 4.6.3, and is fixed in versions 4.5.11 and 4.6.4.
Critical Impact
An authenticated user can abuse pip uninstall arguments to read local files, trigger internal HTTP requests, or corrupt files on the JupyterLab server.
Affected Products
- JupyterLab 4.0.0 through 4.5.10
- JupyterLab 4.6.0 through 4.6.3
- Deployments with the PyPI Extension Manager enabled
Discovery Timeline
- 2026-09-29 - CVE-2026-102904 published to NVD
- 2026-09-29 - Last updated in NVD database
Technical Details for CVE-2026-102904
Vulnerability Analysis
The flaw lives in the JupyterLab PyPI Extension Manager. When a client issues an uninstall request, ExtensionHandler.post routes the supplied name to PyPIExtensionManager.uninstall, which invokes python -m pip uninstall with the value as a positional argument. The handler applies name validation for installs but not for uninstalls.
Because the uninstall path never rejects values that begin with - or --, an authenticated caller can pass arbitrary pip command-line options. Pip options such as --requirement <file> cause pip to read a local file or fetch an internal URL. Parse errors then reflect the first unparsable line back through the API response, producing a file-read primitive.
A --log <path> option lets the attacker create or corrupt files with pip-generated log content. The advisory notes the injection does not add code execution or availability impact beyond ordinary package removal, and the attacker cannot select arbitrary disclosed lines or arbitrary written content.
Exploitation preconditions require the PyPI Extension Manager to be enabled, the account to hold extension API access, and kernels and terminals to be disabled or delegated to remote hosts. In default deployments where kernels are local, the caller already has equivalent file-read and outbound-request capabilities.
Root Cause
Missing input sanitization in the uninstall flow. Install requests run through canonicalize_name and PEP 440 version parsing, but uninstall names are forwarded unchanged to the pip subprocess argv, allowing option injection.
Attack Vector
A network-based authenticated user submits a crafted uninstall request through the extension API. The supplied name begins with --requirement or --log and specifies a target path or URL. The JupyterLab server executes pip uninstall with the injected option, exposing file contents through reflected error output or writing log data to the specified path.
# Security patch in jupyterlab/extensions/pypi.py
# Source: https://github.com/jupyterlab/jupyterlab/commit/a274a8276b9185d03efd4c3c20713d3137ac49e6
@override
async def is_install_allowed(self, name: str, version: str | None = None) -> bool:
if not self._is_valid_package_name(name):
return False
try:
if version is not None:
parse_version(version)
except InvalidVersion:
self.log.warning(f"Version {version!r} does not comply with PEP 440")
return False
The patch adds _is_valid_package_name enforcement and introduces is_uninstall_allowed in jupyterlab/extensions/manager.py to gate uninstall requests through the same validation surface.
Detection Methods for CVE-2026-102904
Indicators of Compromise
- JupyterLab access logs containing POST requests to /lab/api/extensions with body values that start with - or --.
- pip uninstall process invocations whose argv contains --requirement, -r, --log, or file path values referencing sensitive files such as /etc/passwd.
- Unexpected outbound HTTP requests originating from the JupyterLab server process to internal-only URLs shortly after extension API calls.
- New or truncated files owned by the JupyterLab service account containing pip log preamble text.
Detection Strategies
- Inspect JupyterLab tornado access logs for extension API calls where the request body deserializes to a name field beginning with a hyphen.
- Monitor child processes of the JupyterLab kernel or server for python -m pip uninstall invocations that include option flags beyond the package name.
- Correlate extension API activity with file writes or DNS lookups initiated by the server process using endpoint telemetry.
Monitoring Recommendations
- Enable command-line auditing on hosts running JupyterLab to capture full pip argv strings.
- Alert on any extension API request whose payload violates PEP 508 package-name grammar.
- Track authenticated session identifiers that issue extension management calls in environments where kernels and terminals are disabled.
How to Mitigate CVE-2026-102904
Immediate Actions Required
- Upgrade JupyterLab to version 4.5.11 or 4.6.4.
- Disable the PyPI Extension Manager in jupyter_server_config.py if patching is not immediately possible.
- Restrict extension API access to trusted administrator accounts only.
- Review historical logs for uninstall requests containing option-like name values.
Patch Information
The fix ships in JupyterLab 4.5.11 and 4.6.4, tracked as GHSA-3325-v43h-43rv. Patch commits are available in the 4.5.x branch fix and the 4.6.x branch fix. Release notes are published for v4.5.11 and v4.6.4.
Workarounds
- Set JupyterLab.extension_manager = "readonly" or disable the extension manager entirely for multi-tenant deployments.
- Run JupyterLab under a low-privilege service account with a restrictive filesystem policy to limit file-read and file-write impact.
- Place JupyterLab behind an authenticating reverse proxy and restrict egress from the server to prevent internal URL fetches.
# Upgrade to a patched release
pip install --upgrade "jupyterlab>=4.6.4"
# Or, for the 4.5.x line
pip install --upgrade "jupyterlab>=4.5.11,<4.6.0"
# Temporarily disable the PyPI extension manager
jupyter lab --ServerApp.jpserver_extensions="{'jupyterlab.extensions.pypi': False}"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

