CVE-2026-22822: Github.com/external secrets/external secrets External Secrets Operator Insecurely Retrieves Vulnerability

CRITICAL
Advisory Identifier: GHSA-77v3-r3jw-j2v2
CWE-863
Published
Advisory Summary

CVE-2026-22822 is a CRITICAL external secrets operator insecurely retrieves vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/external secrets/external secrets libraries in the Go ecosystem. The issue involves external secrets operator insecurely retrieves secrets through the getsecretkey templating function. Remediation is available by upgrading affected packages to version 1.2.0.

CVE-2026-22822 at a Glance

CVE Identifier CVE-2026-22822
GHSA Identifier GHSA-77v3-r3jw-j2v2
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-863: Incorrect Authorization
Affected Product Github.com/external secrets/external secrets
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-22822

To remediate this vulnerability, upgrade all affected Github.com/external secrets/external secrets dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/external-secrets/external-secrets fixed: 1.2.0
Upgrade github.com/external-secrets/external-secrets to 1.2.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/external-secrets/external-secrets

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-22822, inspect your project dependencies for Github.com/external secrets/external secrets:

inspect dependencies for github.com/external-secrets/external-secrets

Analyze the terminal output to locate any version of Github.com/external secrets/external secrets in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where 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. In Github.com/external secrets/external secrets, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: - https://github.com/external-secrets/external-secrets/issues/5690 - https://github.com/external-secrets/external-secrets/pull/3895

CVE-2026-22822 Affected Github.com/external secrets/external secrets Versions

1 component(s)
Fixed Versions:
1.2.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/external-secrets/external-secrets
Go
≥ 0.20.2
< 1.2.0
1.2.0

References

Frequently Asked Questions

What is CVE-2026-22822?
CVE-2026-22822 is a security vulnerability in Github.com/external secrets/external secrets involving External Secrets Operator insecurely retrieves secrets through the getSecretKey templating function under CWE-863: Incorrect Authorization.
Which Github.com/external secrets/external secrets versions are affected?
Affected versions include releases prior to 1.2.0 across affected packages: github.com/external-secrets/external-secrets.
What version fixes CVE-2026-22822?
Upgrading to 1.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/external-secrets/external-secrets affected?
Yes, github.com/external-secrets/external-secrets is affected in releases prior to 1.2.0. Upgrade your dependency to 1.2.0 or later.
What CWE is associated with CVE-2026-22822?
CVE-2026-22822 is classified under CWE-863: Incorrect Authorization (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.).
How can I check Go dependencies for CVE-2026-22822?
Run the dependency tree command: 'inspect dependencies for github.com/external-secrets/external-secrets'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-77v3-r3jw-j2v2",
  "modified" : "2026-01-22T15:38:48Z",
  "published" : "2026-01-20T16:37:18Z",
  "aliases" : [ "CVE-2026-22822" ],
  "summary" : "External Secrets Operator insecurely retrieves secrets through the getSecretKey templating function",
  "details" : "### 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",
  "severity" : [ {
    "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" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/external-secrets/external-secrets"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.20.2"
      }, {
        "fixed" : "1.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/external-secrets/external-secrets/security/advisories/GHSA-77v3-r3jw-j2v2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-22822"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/external-secrets/external-secrets/issues/5690"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/external-secrets/external-secrets/pull/3895"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/external-secrets/external-secrets/commit/17d3e22b8d3fbe339faf8515a95ec06ec92b1feb"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/external-secrets/external-secrets"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/external-secrets/external-secrets/releases/tag/v1.2.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-20T16:37:18Z",
    "nvd_published_at" : "2026-01-21T22:15:49Z"
  }
}