{"id":"GHSA-whvh-wf3x-g77j","title":"JupyterLab: Allowlist/blocklist check in `PyPIExtensionManager.install()` not enforced for direct callers (missing `await`)","summary":"JupyterLab: Allowlist/blocklist check in `PyPIExtensionManager.install()` not enforced for direct callers (missing `await`)","severity":"low","cwe":["CWE-284","CWE-636"],"vendor":"jupyterlab","product":"jupyterlab","ecosystem":"pip","affected":["jupyterlab >= 4.6.0, <= 4.6.1","jupyterlab <= 4.5.9"],"patched":["jupyterlab 4.6.2","jupyterlab 4.5.10"],"published":"2026-07-22","updated":"2026-07-22","source":"GHSA","sourceUrl":"https://github.com/advisories/GHSA-whvh-wf3x-g77j","references":[{"url":"https://github.com/jupyterlab/jupyterlab/security/advisories/GHSA-whvh-wf3x-g77j"},{"url":"https://github.com/jupyterlab/jupyterlab/pull/19184"},{"url":"https://github.com/jupyterlab/jupyterlab/pull/19185"},{"url":"https://github.com/jupyterlab/jupyterlab/pull/19186"},{"url":"https://github.com/jupyterlab/jupyterlab/commit/be9303f5bcd5308eaeae953c5a3c903046682c2c"},{"url":"https://github.com/jupyterlab/jupyterlab/commit/f1beab4a2027af4719d6edc07d52d6cf5a39a432"},{"url":"https://github.com/jupyterlab/jupyterlab/releases/tag/v4.5.10"},{"url":"https://github.com/jupyterlab/jupyterlab/releases/tag/v4.6.2"},{"url":"https://github.com/advisories/GHSA-whvh-wf3x-g77j"}],"tags":["ghsa","pip"],"ingestedAt":"2026-07-23T00:08:38.876Z","slug":"GHSA-whvh-wf3x-g77j","body":"## Overview\n\nThe extension allowlist/blocklist check inside `PyPIExtensionManager.install()` was not enforced due to a missing await. For purposes of JupyterLab this was a secondary defense-in-depth check: `install()` was intended to enforce the allowlist/blocklist itself for any future uses and users calling this method directly (in addition to the separate check handling requests arriving through the HTTP API).  The only runtime symptom was a `RuntimeWarning: coroutine 'is_install_allowed' was never awaited.`\n\nThis has security implications only for deployments that combine all of the following:\n- a custom extension or downstream integration that imports `PyPIExtensionManager` and calls `install()` directly with a package name influenced by untrusted user input (the stock JupyterLab HTTP handler is not affected - it performs its own awaited allowlist check before calling `install()`);\n- an allowlist/blocklist configured with the intent of restricting which packages users can install;\n- the (default) PyPI Extension Manager enabled; and\n- kernels and terminals disabled or delegated to remote hosts, so that the custom extension's `install()` call is the only available package-install vector (otherwise a user with kernel access can install packages directly regardless of this check)\n\n### Impact\n\nLow. No exposure for stock JupyterLab: the HTTP API and Extension Manager UI enforce the listing through a separate, correctly awaited check. The gap affected only custom extensions or downstream integrations that called the public `install()` method directly and relied on it to self-enforce.\n\n### Patches\n\nJupyterLab [`v4.6.2`](https://github.com/jupyterlab/jupyterlab/releases/tag/v4.6.2) and [`v4.5.10`](https://github.com/jupyterlab/jupyterlab/releases/tag/v4.5.10) contain the patch.\n\nUsers of applications that depend on JupyterLab, such as Notebook v7+, should update `jupyterlab` package too.\n\n### Workarounds\n\nNo action is required for deployments that only expose extension management through the JupyterLab HTTP API / Extension Manager UI, as that path was already enforcing the listing via the handler's own check. Deployments wanting to disable programmatic extension installation entirely can switch to the read-only extension manager:\n\n```bash\n--LabApp.extension_manager=readonly\n```\n\nor the following traitlet:\n\n```python\nc.LabApp.extension_manager = 'readonly'\n```\n\nYou can confirm that the read-only manager is in use from GUI:\n\n<img width=\"293\" height=\"293\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8016c809-633e-4ed0-a5bc-6bc4793caa0f\" />\n\n## Affected packages\n\n- `jupyterlab >= 4.6.0, <= 4.6.1`\n- `jupyterlab <= 4.5.9`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `jupyterlab 4.6.2`\n- `jupyterlab 4.5.10`","depth":"sunlit","depthScore":14,"depthScoreParts":{"impact":13.8,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}