CVE-2025-46342
Kyverno vulnerable to bypass of policy rules that use namespace selectors in match statements
Kyverno is a policy engine designed for cloud native platform engineering teams. Prior to versions 1.13.5 and 1.14.0, it may happen that policy rules using namespace selector(s) in their match statements are mistakenly not applied during admission review request processing due to a missing error propagation in function GetNamespaceSelectorsFromNamespaceLister in pkg/utils/engine/labels.go. As a consequence, security-critical mutations and validations are bypassed, potentially allowing attackers with K8s API access to perform malicious operations. This issue has been patched in versions 1.13.5 and 1.14.0.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
8.6
Kyverno vulnerable to bypass of policy rules that use namespace selectors in match statements
Kyverno is a policy engine designed for cloud native platform engineering teams. Prior to versions 1.13.5 and 1.14.0, it may happen that policy rules using namespace selector(s) in their match statements are mistakenly not applied during admission review request processing due to a missing error propagation in function GetNamespaceSelectorsFromNamespaceLister in pkg/utils/engine/labels.go. As a consequence, security-critical mutations and validations are bypassed, potentially allowing attackers with K8s API access to perform malicious operations. This issue has been patched in versions 1.13.5 and 1.14.0.
- Record
CVE-2025-46342- CVSS 3.1
- 8.6 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-1287
- Updated
- 2026-11-02
EUVDEUVD-2025-12613
8.6
Kyverno is a policy engine designed for cloud native platform engineering teams. Prior to versions 1.13.5 and 1.14.0, it may happen that policy rules using namespace selector(s) in their match statements are mistakenly not applied during admission review request processing due to a missing error propagation in function GetNamespaceSelectorsFromNamespaceLister in pkg/utils/engine/labels.go. As a consequence, security-critical mutations and validations are bypassed, potentially allowing attackers with K8s API access to perform malicious operations. This issue has been patched in versions 1.13.5 and 1.14.0.
- Record
EUVD-2025-12613- CVSS 3.1
- 8.6 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-jrr2-x33p-6hvc
8.5
Kyverno vulnerable to bypass of policy rules that use namespace selectors in match statements
Summary
Due to a missing error propagation in function GetNamespaceSelectorsFromNamespaceLister in pkg/utils/engine/labels.go it may happen that policy rules using namespace selector(s) in their match statements are mistakenly not applied during admission review request processing. As a consequence, security-critical mutations and validations are bypassed, potentially allowing attackers with K8s API access to perform malicious operations.
Details
As a policy engine Kyverno is a critical component ensuring the security of Kubernetes clusters by apply security-relevant policy rules in the Kubernetes admission control process.
We encountered a case where Kyverno did not apply policy rules which should have been applied. This happened in both the mutation and the validation phase of admission control. Effectively Kyverno handled the admission review requests as if those policy rules did not exist. Consequently, the Kube API request was accepted without applying security-relevant patches and validations.
As the root cause we identified a missing error propagation in function GetNamespaceSelectorsFromNamespaceLister in pkg/utils/engine/labels.go ([src][1]).
All affected policy rules use a namespace selector in their match resource filters like this:
match:
all:
- resources:
namespaceSelector:
matchExpressions:
- key: label1
operator: Exists
Such specification intents to apply rules only to resource objects which reside in a namespace whose labels match the given label expressions.
When Kyverno handles an admission webhook, function GetNamespaceSelectorsFromNamespaceLister in package
github.com/kyverno/kyverno/pkg/utils/engine ([src][1]) is called to retrieve the labels of the request object's namespace. This function gets the namespace object from a "k8s.io/client-go/listers/core/v1".NamespaceLister. In case the
namespace lister returns an error, GetNamespaceSelectorsFromNamespaceLister does NOT propagate this error to its caller, but returns an empty label map, which is equivalent to a namespace without any labels.
The returned label map is later used to select matching policy rules. If a rule has a resource filter with namespace selector, it will be mistakenly excluded or included.
The namespace lister fails to return the namespace object if the underlying SharedIndexInformer has not (yet) updated its cache. Those updates happen based on watch events from the Kube API Server, which does not guarantee any maximum delivery time. If the Kube API Server handling the watch is under high load or otherwise impaired (e.g. requests to etcd take longer due to pending leader election in HA setup) then informer cache updates can be delayed significantly. However, we did not find a way to reliably reproduce such condition.
To bypass Kyverno policies, an attacker may try to exploit the described misbehavior by:
-
putting the Kube API Server under load before sending requests that Kyverno policies should be bypassed for.
-
sending many request with a high rate to Kube API Server.
We did not try any of such attack vectors and therefore cannot prove their effectiveness.
In our scenario the Kyverno policies apply to pods in "sandbox" namespaces identified as such by certain labels. Those single-use namespaces and the pods therein are frequently created (and removed) by other controllers. Therefore, Kyverno often receives admission webhooks for objects whose namespace has been created shortly before.
Correction Proposal
Function GetNamespaceSelectorsFromNamespaceLister in package github.com/kyverno/kyverno/pkg/utils/engine ([src][1]) should return an error instead of an empty label map in case it could not get the namespace object from the namespace lister. This error will then cause admission webhook processing to fail, which lets Kubernetes fail the Kube API request if the policy's failure policy is Fail (a must for…
- Record
GHSA-jrr2-x33p-6hvc- CVSS 3.1
- 8.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-1287
- Updated
- 2026-11-02
NVD
8.5
Kyverno is a policy engine designed for cloud native platform engineering teams. Prior to versions 1.13.5 and 1.14.0, it may happen that policy rules using namespace selector(s) in their match statements are mistakenly not applied during admission review request processing due to a missing error propagation in function GetNamespaceSelectorsFromNamespaceLister in pkg/utils/engine/labels.go. As a consequence, security-critical mutations and validations are bypassed, potentially allowing attackers with K8s API access to perform malicious operations. This issue has been patched in versions 1.13.5 and 1.14.0.
- Record
CVE-2025-46342- CVSS 3.1
- 8.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H - CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:H - Weakness
- CWE-1287
- Updated
- 2026-11-02
OSV
8.5
Kyverno vulnerable to bypass of policy rules that use namespace selectors in match statements
Kyverno is a policy engine designed for cloud native platform engineering teams. Prior to versions 1.13.5 and 1.14.0, it may happen that policy rules using namespace selector(s) in their match statements are mistakenly not applied during admission review request processing due to a missing error propagation in function GetNamespaceSelectorsFromNamespaceLister in pkg/utils/engine/labels.go. As a consequence, security-critical mutations and validations are bypassed, potentially allowing attackers with K8s API access to perform malicious operations. This issue has been patched in versions 1.13.5 and 1.14.0.
- Record
CVE-2025-46342- CVSS 3.1
- 8.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-1287
- Updated
- 2026-11-02
OSVGHSA-jrr2-x33p-6hvc
8.5
Kyverno vulnerable to bypass of policy rules that use namespace selectors in match statements
Summary
Due to a missing error propagation in function GetNamespaceSelectorsFromNamespaceLister in pkg/utils/engine/labels.go it may happen that policy rules using namespace selector(s) in their match statements are mistakenly not applied during admission review request processing. As a consequence, security-critical mutations and validations are bypassed, potentially allowing attackers with K8s API access to perform malicious operations.
Details
As a policy engine Kyverno is a critical component ensuring the security of Kubernetes clusters by apply security-relevant policy rules in the Kubernetes admission control process.
We encountered a case where Kyverno did not apply policy rules which should have been applied. This happened in both the mutation and the validation phase of admission control. Effectively Kyverno handled the admission review requests as if those policy rules did not exist. Consequently, the Kube API request was accepted without applying security-relevant patches and validations.
As the root cause we identified a missing error propagation in function GetNamespaceSelectorsFromNamespaceLister in pkg/utils/engine/labels.go ([src][1]).
All affected policy rules use a namespace selector in their match resource filters like this:
match:
all:
- resources:
namespaceSelector:
matchExpressions:
- key: label1
operator: Exists
Such specification intents to apply rules only to resource objects which reside in a namespace whose labels match the given label expressions.
When Kyverno handles an admission webhook, function GetNamespaceSelectorsFromNamespaceLister in package
github.com/kyverno/kyverno/pkg/utils/engine ([src][1]) is called to retrieve the labels of the request object's namespace. This function gets the namespace object from a "k8s.io/client-go/listers/core/v1".NamespaceLister. In case the
namespace lister returns an error, GetNamespaceSelectorsFromNamespaceLister does NOT propagate this error to its caller, but returns an empty label map, which is equivalent to a namespace without any labels.
The returned label map is later used to select matching policy rules. If a rule has a resource filter with namespace selector, it will be mistakenly excluded or included.
The namespace lister fails to return the namespace object if the underlying SharedIndexInformer has not (yet) updated its cache. Those updates happen based on watch events from the Kube API Server, which does not guarantee any maximum delivery time. If the Kube API Server handling the watch is under high load or otherwise impaired (e.g. requests to etcd take longer due to pending leader election in HA setup) then informer cache updates can be delayed significantly. However, we did not find a way to reliably reproduce such condition.
To bypass Kyverno policies, an attacker may try to exploit the described misbehavior by:
-
putting the Kube API Server under load before sending requests that Kyverno policies should be bypassed for.
-
sending many request with a high rate to Kube API Server.
We did not try any of such attack vectors and therefore cannot prove their effectiveness.
In our scenario the Kyverno policies apply to pods in "sandbox" namespaces identified as such by certain labels. Those single-use namespaces and the pods therein are frequently created (and removed) by other controllers. Therefore, Kyverno often receives admission webhooks for objects whose namespace has been created shortly before.
Correction Proposal
Function GetNamespaceSelectorsFromNamespaceLister in package github.com/kyverno/kyverno/pkg/utils/engine ([src][1]) should return an error instead of an empty label map in case it could not get the namespace object from the namespace lister. This error will then cause admission webhook processing to fail, which lets Kubernetes fail the Kube API request if the policy's failure policy is Fail (a must for…
- Record
GHSA-jrr2-x33p-6hvc- CVSS 3.1
- 8.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-1287
- Updated
- 2026-11-02
OSVBIT-kyverno-2025-46342 No score
Kyverno vulnerable to bypass of policy rules that use namespace selectors in match statements
Kyverno is a policy engine designed for cloud native platform engineering teams. Prior to versions 1.13.5 and 1.14.0, it may happen that policy rules using namespace selector(s) in their match statements are mistakenly not applied during admission review request processing due to a missing error propagation in function GetNamespaceSelectorsFromNamespaceLister in pkg/utils/engine/labels.go. As a consequence, security-critical mutations and validations are bypassed, potentially allowing attackers with K8s API access to perform malicious operations. This issue has been patched in versions 1.13.5 and 1.14.0.
- Record
BIT-kyverno-2025-46342- Updated
- 2026-11-02
OSVGO-2025-3652 No score
Kyverno vulnerable to bypass of policy rules that use namespace selectors in match statements in github.com/kyverno/kyverno
Kyverno vulnerable to bypass of policy rules that use namespace selectors in match statements in github.com/kyverno/kyverno
- Record
GO-2025-3652- Updated
- 2026-11-02
OSVopenSUSE-SU-2025:15059-1 No score
govulncheck-vulndb-0.0.20250506T153719-1.1 on GA media
These are all security issues fixed in the govulncheck-vulndb-0.0.20250506T153719-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:15059-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/kyverno/kyvernoGo |
before 1.13.5 | 1.13.5 |
github.com/kyverno/kyvernoGo |
1.14.0-alpha.1 up to 1.14.0 | 1.14.0 |
kyvernoBitnami |
before 1.13.5 | 1.13.5 |
github.com/kyverno/kyvernoGo |
before 1.13.5, 1.14.0-alpha.1 up to 1.14.0 | 1.13.51.14.0 |
govulncheck-vulndbopenSUSE:Tumbleweed From an advisory covering 12 CVEs |
before 0.0.20250506T153719-1.1 | 0.0.20250506T153719-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-46342 is a high vulnerability (CVSS 8.6) in Kyverno, published April 29, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.77%, the 55th percentile. Fixed in github.com/kyverno/kyverno 1.13.5.
References
github.com/kyverno/kyverno/security/advisories/GHSA-jrr2-x33p-6hvc
github.com/kyverno/kyverno/commit/3ff923b7756e1681daf73849954bd88516589194
nvd.nist.gov/vuln/detail/CVE-2025-46342
pkg.go.dev/vuln/GO-2025-3652
github.com/advisories/GHSA-jrr2-x33p-6hvc
github.com/CVEProject/cvelistV5/tree/main/cves/2025/46xxx/CVE-2025-46342.json
Show 14 moreShow less
github.com/kyverno/kyverno
lists.opensuse.org/archives/list/[email protected]/thread/HNV7O7SNYYY4AFS5HKAPLITKK3B57LE7
suse.com/security/cve/CVE-2019-11243
suse.com/security/cve/CVE-2023-32198
suse.com/security/cve/CVE-2024-22031
suse.com/security/cve/CVE-2025-23390
suse.com/security/cve/CVE-2025-32777
suse.com/security/cve/CVE-2025-3879
suse.com/security/cve/CVE-2025-4166
suse.com/security/cve/CVE-2025-4210
suse.com/security/cve/CVE-2025-46327
suse.com/security/cve/CVE-2025-46342
suse.com/security/cve/CVE-2025-46569
suse.com/security/cve/CVE-2025-46599
Left out here: the rest of 2 source descriptions. The JSON record has them.