CVE-2026-22822
Cross-Namespace Secret Access Vulnerability in External Secrets Operator
Publication date: 2026-01-21
Last updated on: 2026-02-18
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| external-secrets | external_secrets_operator | From 0.20.2 (inc) to 1.2.0 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-863 | The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability exists in the External Secrets Operator versions starting from 0.20.2 up to but not including 1.2.0. The `getSecretKey` template function, originally introduced for the senhasegura Devops Secrets Management provider, can be exploited to fetch secrets across Kubernetes namespaces using the roleBinding of the external-secrets controller. This bypasses the intended security mechanisms, allowing unauthorized access to secrets. The function was removed in version 1.2.0 to prevent this issue, and alternative methods that respect security safeguards are recommended. As a workaround, policy engines like Kubernetes, Kyverno, Kubewarden, or OPA can be used to block the use of `getSecretKey` in any ExternalSecret resource.
How can this vulnerability impact me? :
This vulnerability can lead to unauthorized access to sensitive secrets across Kubernetes namespaces, potentially exposing confidential information. Attackers or unauthorized users could exploit the `getSecretKey` function to bypass security controls and retrieve secrets they should not have access to, which could compromise the security of applications and infrastructure relying on these secrets.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by checking for the usage of the `getSecretKey` template function in any ExternalSecret resource within your Kubernetes cluster. Since the vulnerability involves cross-namespace secret fetching via this function, inspecting ExternalSecret manifests or configurations for the presence of `getSecretKey` usage is key. There are no specific commands provided, but you can use kubectl to search for this function in ExternalSecret resources, for example: `kubectl get externalsecrets --all-namespaces -o yaml | grep getSecretKey`.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include upgrading the External Secrets Operator to version 1.2.0 or later, where the `getSecretKey` function has been completely removed. As a workaround, you can use a policy engine such as Kubernetes native policies, Kyverno, Kubewarden, or OPA to prevent the usage of `getSecretKey` in any ExternalSecret resource, thereby enforcing security safeguards until the upgrade is applied.