Skip to content
Heist/ feed
Back to feed
Critical

External Secrets Operator insecurely retrieves secrets through the getSecretKey templating function

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-22822
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 02:21 UTC · Revision 1

Source evidence

External Secrets Operator insecurely retrieves secrets through the getSecretKey templating function

core-osv · Original source

Published 21 Jan 2026, 21:22 UTC

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.

osv:CVE-2026-22822
Complete source record
{
  "id": "ee281889fc5809d2bd74114b7a0db4a16cbdfd7c5bad50f31303d8d57922f39c",
  "url": "https://osv.dev/vulnerability/CVE-2026-22822",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "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.",
    "evidence": "osv:CVE-2026-22822",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-22822",
      "aliases": [
        "CVE-2026-22822",
        "GHSA-77v3-r3jw-j2v2",
        "GO-2026-4330"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/external-secrets/external-secrets",
              "type": "GIT",
              "events": [
                {
                  "introduced": "ea11b0ace2a7bf6a334442339233d2417ad19d95"
                },
                {
                  "fixed": "f22b8a1b058d9497030b6a5c307ebee3af12a561"
                },
                {
                  "fixed": "17d3e22b8d3fbe339faf8515a95ec06ec92b1feb"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:external-secrets:external_secrets_operator:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0.20.2"
                      },
                      {
                        "fixed": "1.2.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "17d3e22b8d3fbe339faf8515a95ec06ec92b1feb"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "f22b8a1b058d9497030b6a5c307ebee3af12a561"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v1.2.0"
                  }
                ]
              }
            }
          ],
          "versions": [
            "helm-chart-1.1.1",
            "v1.1.1",
            "helm-chart-1.1.0",
            "v1.1.0",
            "helm-chart-1.0.0",
            "v1.0.0",
            "v0.2.1-esoctl",
            "v0.2.0-esoctl",
            "helm-chart-0.20.4",
            "v0.20.4",
            "helm-chart-0.20.3",
            "v0.20.3",
            "helm-chart-0.20.2",
            "v0.20.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-22822.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:49.324269984Z",
      "provider": "osv",
      "references": [
        "https://github.com/external-secrets/external-secrets/releases/tag/v1.2.0",
        "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-22822.json",
        "https://access.redhat.com/security/cve/CVE-2026-22822",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/22xxx/CVE-2026-22822.json",
        "https://github.com/external-secrets/external-secrets/security/advisories/GHSA-77v3-r3jw-j2v2",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-22822",
        "https://bugzilla.redhat.com/show_bug.cgi?id=2431873",
        "https://github.com/external-secrets/external-secrets/issues/5690",
        "https://github.com/external-secrets/external-secrets/commit/17d3e22b8d3fbe339faf8515a95ec06ec92b1feb",
        "https://github.com/external-secrets/external-secrets/pull/3895"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-863"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/22xxx/CVE-2026-22822.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-22822",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 517320,
  "published_at": "2026-01-21T21:22:05.249+00:00"
}