9.3critical
External Secrets Operator insecurely retrieves secrets through the getSecretKey templating function
- Severity
- 9.3critical CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.19% (higher than 9% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-77v3-r3jw-j2v2GO-2026-4330
Description
External Secrets Operator reads information from a third-party service and automatically injects the values as Kubernetes Secrets. Starting in version 0.20.2 and prior to version 1.2.0, the `getSecretKey` template function, while introduced for senhasegura Devops Secrets Management (DSM) provider, has the ability to fetch secrets cross-namespaces with the roleBinding of the external-secrets controller, bypassing our security mechanisms. This function was completely removed in version 1.2.0, as everything done with that templating function can be done in a different way while respecting External Secrets Operator's safeguards As a workaround, use a policy engine such as Kubernetes, Kyverno, Kubewarden, or OPA to prevent the usage of `getSecretKey` in any ExternalSecret resource.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| external-secrets external-secrets | >= 0.20.2, < 1.2.0 | CVE List |
| external-secrets-operator/bitwarden-sdk-server-rhel9 | Not specified | CVE List |
| external-secrets-operator/external-secrets-operator-bundle | Not specified | CVE List |
| external-secrets-operator/external-secrets-operator-rhel9 | Not specified | CVE List |
| external-secrets-operator/external-secrets-rhel9 | Not specified | CVE List |
| github.com/external-secrets/external-secrets (Go) | from 0.20.2 before 1.2.0 | GitHub Advisory Database, Go Vulnerability Database |
| external-secrets external_secrets_operator | from 0.20.2 before 1.2.0 | NVD |
All scores
| GitHub_M | 9.3critical CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H |
| redhat-SADP | 8.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
| GitHub | critical CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
External Secrets Operator reads information from a third-party service and automatically injects the values as Kubernetes Secrets. Starting in version 0.20.2 and prior to version 1.2.0, the `getSecretKey` template function, while introduced for senhasegura Devops Secrets Management (DSM) provider, has the ability to fetch secrets cross-namespaces with the roleBinding of the external-secrets controller, bypassing our security mechanisms. This function was completely removed in version 1.2.0, as everything done with that templating function can be done in a different way while respecting External Secrets Operator's safeguards As a workaround, use a policy engine such as Kubernetes, Kyverno, Kubewarden, or OPA to prevent the usage of `getSecretKey` in any ExternalSecret resource.
GitHub Advisory Database
Summary
The getSecretKey template function, while introduced for senhasegura Devops Secrets Management (DSM) provider, has the ability to fetch secrets cross-namespaces with the roleBinding of the external-secrets controller, bypassing our security mechanisms.
This function was completely removed, as everything done with that templating function can be done in a different way while respecting our safeguards (for example, using sourceRef like explained here: https://github.com/external-secrets/external-secrets/issues/5690#issuecomment-3630977865)
Impact
- Cross-namespace secret access: Attackers or misconfigured resources could retrieve secrets from namespaces other than the one intended.
- privilege escalation: Unauthorized access to secrets could lead to privilege escalation, data exfiltration, or compromise of service accounts and credentials.
Resolution
We removed the incriminated templating function from our codebase. All users should upgrade to the latest version containing this fix.
Workarounds
Use a policy engine such as Kubernetes, Kyverno, Kubewarden, or OPA to prevent the usage of getSecretKey in any ExternalSecret resource.
Details
See also:
Go Vulnerability Database
External Secrets Operator insecurely retrieves secrets through the getSecretKey templating function in github.com/external-secrets/external-secrets
NVD (es)
External Secrets Operator lee información de un servicio de terceros e inyecta automáticamente los valores como Secrets de Kubernetes. A partir de la versión 0.20.2 y antes de la versión 1.2.0, la función de plantilla 'getSecretKey', aunque introducida para el proveedor senhasegura Devops Secrets Management (DSM), tiene la capacidad de obtener secretos entre espacios de nombres con el roleBinding del controlador external-secrets, eludiendo nuestros mecanismos de seguridad. Esta función fue completamente eliminada en la versión 1.2.0, ya que todo lo que se hacía con esa función de plantilla se puede hacer de una manera diferente respetando las salvaguardas de External Secrets Operator. Como solución alternativa, utilice un motor de políticas como Kubernetes, Kyverno, Kubewarden u OPA para evitar el uso de 'getSecretKey' en cualquier recurso ExternalSecret.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-22822 changed 2026-07-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-77v3-r3jw-j2v2 changed 2026-04-16 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4330 changed 2026-04-16 | CC-BY-4.0 |
| NVD | CVE-2026-22822 changed 2026-07-15 | Public domain |