CVE-2026-54523 — Vulnerability in github.com/kyverno/kyverno
Kyverno's NamespacedGeneratingPolicy generator.apply() namespace argument unvalidated -- background controller creates RoleBindings in any namespace including kube-system
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.47%). Schedule for your next planned update.
Does your project use an affected github.com/kyverno/kyverno version?
Paste your go.sum to check it for CVE-2026-54523 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
In Kyverno v1.18.1, a tenant who can create a NamespacedMutatingPolicy in their own namespace can instruct the admission controller to generate resources in any namespace by passing an arbitrary namespace string to the CEL generator.apply(namespace, resources) function.
Details
pkg/cel/libs/context.go:177 declares GenerateResources(namespace string, dataList []map[string]any). The namespace argument arrives unvalidated from the CEL expression generator.apply("<target-namespace>", [...]).
Version-Specific Impact
v1.18.0, v1.18.1 (affected via NamespacedMutatingPolicy only):
The nmpol CEL compiler unintentionally exposes the generator library to match condition expressions. A namespaced mutating policy can invoke generator.apply() in a boolean CEL expression such as matchConditions, triggering the admission controller to generate resources in any namespace at request time. This side effect executes with the admission controller's cluster-wide privileges.
NamespacedGeneratingPolicy is not a vector in v1.18.1 due to incomplete webhook and background processing wiring (not registered or functional).
Root Cause
The admission validator for NamespacedMutatingPolicy (pkg/cel/policies/mpol/validate.go) only checks that the policy compiles and does not enforce namespace scope on generator.apply() arguments.
Compare correctly-guarded equivalents: pkg/engine/context/loaders/configmap.go:102 rejects cross-namespace ConfigMap references for namespaced policies, and pkg/engine/apicall/apicall.go:73-82 enforces namespace segment matching. GenerateResources has neither guard.
Proof of Concept
Prerequisites: namespace tenant-ns exists; attacker has create on namespacedmutatingpolicies.policies.kyverno.io in tenant-ns.
apiVersion: policies.kyverno.io/v1beta1
kind: NamespacedMutatingPolicy
metadata:
name: cross-ns-escalate
namespace: tenant-ns
spec:
matchConstraints:
resourceRules:
- apiGroups: [""]
apiVersions: ["v1"]
resources: ["configmaps"]
operations: ["CREATE"]
mutations:
- patchType: applyConfiguration
applyConfiguration:
expression: object
matchConditions:
- name: trigger-escalation
expression: |
generator.apply("kube-system", [
{
"apiVersion": dyn("v1"),
"kind": dyn("ConfigMap"),
"metadata": dyn({
"name": "kube-system-config",
"namespace": "kube-system"
}),
"data": dyn({
"injected-by": "tenant-policy",
"impact": "unauthorized access to kube-system namespace"
})
}
])
Apply the policy, then create any ConfigMap in tenant-ns to trigger the admission webhook. The admission controller creates configmap/kube-system-config in kube-system. By default, the admission controller has create on ConfigMaps in all namespaces.
Impact
A namespace-scoped user with create on NamespacedMutatingPolicy in >=v1.18.1 can create ConfigMaps, NetworkPolicies, Secrets, and other resources in any namespace using the admission controller's cluster-wide RBAC. This allows:
Injecting sensitive configuration into protected namespaces (e.g., kube-system, default)
Disrupting cluster networking via NetworkPolicies
Privilege escalation via RoleBinding creation (for roles the admission controller holds or lesser-privileged roles)
Privilege escalation via RoleBinding creation in other namespaces
Any installation that grants non-admin users access to NamespacedMutatingPolicy creation is affected.
Timeline
- 2026-05-20: Vulnerability reproduced on main
- 2026-07-13: CVE-2026-54523 / GHSA-79gf-7frw-68m9 published
- 2026-07-22: Advisory clarified to document actual v1.18.1 attack vector (NamespacedMutatingPolicy in matchConditions, not NamespacedGeneratingPolicy)
Advisory Update
This advisory was updated to clarify the v1.18.1 attack surface. The nmpol vector in matchConditions was the reachable attack path in v1.18.1, while ngpol lacked end-to-end plumbing. The CVE, patched version, and CVSS score remain unchanged. Original report by @0xVijay.
Advisory Timeline
- First published August 26, 2026 (92 days ago).
- Last revised September 2, 2026 — 7 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/kyverno/kyverno@v1.18.2
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Go (1).
| Package | Fixed In |
|---|---|
| github.com/kyverno/kyverno Go · Affected: All versions | 1.18.2 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-862Missing AuthorizationMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.6 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
References
- https://github.com/kyverno/kyverno/security/advisories/GHSA-79gf-7frw-68m9WEB
- https://github.com/kyverno/kyverno/pull/16238WEB
- https://github.com/kyverno/kyverno/commit/0919553c0ea1904f8d891280c92018da97946a06WEB
- https://github.com/kyverno/kyverno/commit/5164bcdeda5b57678bc2d7a03ecc2cbb02982daeWEB
- https://github.com/kyverno/sdk/commit/6573937441443e1ba5af9fbb28d5c0f20297f9dfWEB
- https://github.com/kyverno/kyvernoPACKAGE
- https://github.com/kyverno/kyverno/releases/tag/v1.18.2WEB
Frequently Asked Questions
- What is CVE-2026-54523?
- Kyverno's NamespacedGeneratingPolicy generator.apply() namespace argument unvalidated -- background controller creates RoleBindings in any namespace including kube-system. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.6/10).
- How do I check if my project is affected by CVE-2026-54523?
- CVE-2026-54523 affects github.com/kyverno/kyverno. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-54523 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 32.4% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-104099CRITICAL
Fabio: Access-control bypass through unnormalized request paths
- CVE-2026-22039CRITICAL
Kyverno Cross-Namespace Privilege Escalation via Policy apiCall
- CVE-2026-84200CRITICAL
Bypassing Kyverno Policies via Double Policy Exceptions
- CVE-2026-77369CRITICAL
Daptin: Broken Access Control (IDOR) in the generic YJS collaboration endpoint
- CVE-2025-46342HIGH
Kyverno vulnerable to bypass of policy rules that use namespace selectors in match statements
- CVE-2026-4789HIGH
Kyverno has SSRF via CEL http.Get/http.Post in NamespacedValidatingPolicy allows cross-namespace data access