CVE-2026-22822
JSON

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 packageVersionsReported by
external-secrets external-secrets>= 0.20.2, < 1.2.0CVE List
external-secrets-operator/bitwarden-sdk-server-rhel9Not specifiedCVE List
external-secrets-operator/external-secrets-operator-bundleNot specifiedCVE List
external-secrets-operator/external-secrets-operator-rhel9Not specifiedCVE List
external-secrets-operator/external-secrets-rhel9Not specifiedCVE List
github.com/external-secrets/external-secrets (Go)from 0.20.2 before 1.2.0GitHub Advisory Database, Go Vulnerability Database
external-secrets external_secrets_operatorfrom 0.20.2 before 1.2.0NVD

All scores

GitHub_M9.3critical CVSS:4.0CVSS: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-SADP8.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHubcritical CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-863

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

https://github.com/external-secrets/external-secrets/security/advisories/GHSA-77v3-r3jw-j2v2advisory, vendor-advisory, web
https://github.com/external-secrets/external-secrets/issues/5690issue-tracking, report, web
https://github.com/external-secrets/external-secrets/pull/3895fix, issue-tracking, web
https://github.com/external-secrets/external-secrets/commit/17d3e22b8d3fbe339faf8515a95ec06ec92b1febfix, patch, web
https://github.com/external-secrets/external-secrets/releases/tag/v1.2.0product, release-notes, web
https://access.redhat.com/security/cve/CVE-2026-22822vdb-entry
https://bugzilla.redhat.com/show_bug.cgi?id=2431873issue-tracking
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-22822.json
https://nvd.nist.gov/vuln/detail/CVE-2026-22822advisory
https://github.com/external-secrets/external-secretspackage

Sources

SourceRecordLicence
CVE ListCVE-2026-22822 changed 2026-07-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-77v3-r3jw-j2v2 changed 2026-04-16CC-BY-4.0
Go Vulnerability DatabaseGO-2026-4330 changed 2026-04-16CC-BY-4.0
NVDCVE-2026-22822 changed 2026-07-15Public domain