Vulnerability record · PyPI
PYSEC-2026-4055
Description
JupyterLab's PyPI extension manager runs python -m pip uninstall with the extension name taken from the request body. ExtensionHandler.post validates the name for cmd=install but not for cmd=uninstall, so a name that begins with - reaches the command line and pip reads it as an option rather than as a package.
cmdline = [
sys.executable,
"-m",
"pip",
"uninstall",
"--yes",
"--no-input",
extension,
]
An extension name of the form -r followed by a path therefore made pip open that path as a requirements file. pip's parse error quotes the line it could not read and names the file it came from, and JupyterLab returned that error in the response body, so the line reached the requester.
This has security implications only for deployments that combine all of the following:
Unlike GHSA-37w4-hwhx-4rc4 and GHSA-89vp-jrxv-24w8, this does not need an allowlist or blocklist to be configured. The uninstall path never consulted the listing.
An authenticated user gains a read of server-side files and an outbound request from the server, both outside the confinement that the contents root and the disabled kernels were meant to provide. The user cannot choose which line of a file is returned, and cannot write content of their choosing.
-r<path> makes pip open the path as a requirements file. The first line that pip cannot parse as a requirement comes back…
Manual fix · PyPI
pip install --upgrade "jupyterlab>=4.5.11"Sources