{"id":"CVE-2026-22822","aliases":["CVE-2026-22822","GHSA-77v3-r3jw-j2v2","GO-2026-4330"],"related":[],"kind":"vulnerability","state":"published","title":"External Secrets Operator insecurely retrieves secrets through the getSecretKey templating function","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe `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.\n\nThis 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)\n\n### Impact\n- Cross-namespace secret access: Attackers or misconfigured resources could retrieve secrets from namespaces other than the one intended.\n- privilege escalation: Unauthorized access to secrets could lead to privilege escalation, data exfiltration, or compromise of service accounts and credentials.\n\n### Resolution\n\nWe removed the incriminated templating function from our codebase. All users should upgrade to the latest version containing this fix.\n\n### Workarounds\n\nUse a policy engine such as Kubernetes, Kyverno, Kubewarden, or OPA to prevent the usage of `getSecretKey` in any ExternalSecret resource.\n\n### Details\n\nSee also:\n- https://github.com/external-secrets/external-secrets/issues/5690\n- https://github.com/external-secrets/external-secrets/pull/3895","format":"markdown","source":"ghsa"},{"lang":"en","text":"External Secrets Operator insecurely retrieves secrets through the getSecretKey templating function in github.com/external-secrets/external-secrets","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-01-20T16:37:18.000Z","modified":"2026-07-15T02:18:37.703Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":9.3,"rating":"CRITICAL"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"version":">= 0.20.2, < 1.2.0","status":"affected"}],"vendor":"external-secrets","product":"external-secrets","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"External Secrets Operator for Red Hat OpenShift","package":"external-secrets-operator/bitwarden-sdk-server-rhel9","cpe":"cpe:/a:redhat:external_secrets_operator:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"External Secrets Operator for Red Hat OpenShift","package":"external-secrets-operator/external-secrets-operator-bundle","cpe":"cpe:/a:redhat:external_secrets_operator:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"External Secrets Operator for Red Hat OpenShift","package":"external-secrets-operator/external-secrets-operator-rhel9","cpe":"cpe:/a:redhat:external_secrets_operator:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"External Secrets Operator for Red Hat OpenShift","package":"external-secrets-operator/external-secrets-rhel9","cpe":"cpe:/a:redhat:external_secrets_operator:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"external secrets operator for Red Hat OpenShift - Tech Preview","package":"external-secrets-operator/bitwarden-sdk-server-rhel9","cpe":"cpe:/a:redhat:external_secrets_operator:0","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"external secrets operator for Red Hat OpenShift - Tech Preview","package":"external-secrets-operator/external-secrets-operator-bundle","cpe":"cpe:/a:redhat:external_secrets_operator:0","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"external secrets operator for Red Hat OpenShift - Tech Preview","package":"external-secrets-operator/external-secrets-operator-rhel9","cpe":"cpe:/a:redhat:external_secrets_operator:0","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"external secrets operator for Red Hat OpenShift - Tech Preview","package":"external-secrets-operator/external-secrets-rhel9","cpe":"cpe:/a:redhat:external_secrets_operator:0","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.20.2","status":"affected","fixed":"1.2.0"}],"ecosystem":"Go","package":"github.com/external-secrets/external-secrets","purl":"pkg:golang/github.com/external-secrets/external-secrets","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.20.2","status":"affected","fixed":"1.2.0"}],"ecosystem":"Go","package":"github.com/external-secrets/external-secrets","purl":"pkg:golang/github.com/external-secrets/external-secrets","source":"go"},{"ranges":[{"status":"affected","introduced":"0.20.2","fixed":"1.2.0"}],"vendor":"external-secrets","product":"external_secrets_operator","cpe":"cpe:2.3:a:external-secrets:external_secrets_operator:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/external-secrets/external-secrets/security/advisories/GHSA-77v3-r3jw-j2v2","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/external-secrets/external-secrets/issues/5690","tags":["issue-tracking","report","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/external-secrets/external-secrets/pull/3895","tags":["fix","issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/external-secrets/external-secrets/commit/17d3e22b8d3fbe339faf8515a95ec06ec92b1feb","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/external-secrets/external-secrets/releases/tag/v1.2.0","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-22822","tags":["vdb-entry","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2431873","tags":["issue-tracking","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-22822.json","tags":["x-sadp-csaf-vex"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22822","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/external-secrets/external-secrets","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-01-22T15:10:57.677Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-22822","url":"https://www.cve.org/CVERecord?id=CVE-2026-22822","licence":"CVE Terms of Use","modified":"2026-07-15T01:19:08.563Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-77v3-r3jw-j2v2","url":"https://github.com/advisories/GHSA-77v3-r3jw-j2v2","licence":"CC-BY-4.0","modified":"2026-04-16T02:14:29.314Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-4330","url":"https://pkg.go.dev/vuln/GO-2026-4330","licence":"CC-BY-4.0","modified":"2026-04-16T02:14:28.931Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-22822","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22822","licence":"Public domain","modified":"2026-07-15T02:18:37.703Z"}],"updatedAt":"2026-11-25T22:59:13.024Z","epss":{"score":0.00192,"percentile":0.09248,"date":"2026-12-01T12:00:22.000Z"}}