CVE-2026-22822: External Secrets Operator insecurely retrieves secrets through the getSecretKey templating function

Published Jan 20, 2026
·
Updated

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

Other sources

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.

— MITRE

Affected Software

2 affected componentsFixes available
go/github.com/external-secrets/external-secrets>=0.20.2<1.2.0
1.2.0
external-secrets External Secrets Operator>=0.20.2<1.2.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/external-secrets/external-secrets to a version that resolves this vulnerability.

    Fixed in 1.2.0
  2. Upgrade

    Upgrade external-secrets/external-secrets to a version that resolves this vulnerability.

    Fixed in 1.2.0
  3. Configuration

    Use a policy engine (Kubernetes admission policies, Kyverno, Kubewarden, or OPA) to prevent the usage of `getSecretKey` in any ExternalSecret resource.

    External Secrets Operator getSecretKey template function usage in ExternalSecret resources = disallow

Event History

Jan 20, 2026
Advisory Published
via GitHub·04:37 PM
Data Sourced
via GitHub·04:37 PM
DescriptionWeaknessAffected Software
Jan 21, 2026
CVE Published
via MITRE·09:22 PM
Data Sourced
via MITRE·09:22 PM
DescriptionWeakness
Data Sourced
via Red Hat·10:02 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·10:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 PM
RemedyAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-22822?

CVE-2026-22822 is rated as a high severity vulnerability due to its potential to expose sensitive secrets across namespaces.

2

How do I fix CVE-2026-22822?

To fix CVE-2026-22822, you should upgrade the external-secrets package to version 1.2.0 or later.

3

What impact does CVE-2026-22822 have on system security?

CVE-2026-22822 allows unauthorized access to secrets managed by external-secrets, potentially leading to information disclosure.

4

Which versions of the external-secrets package are affected by CVE-2026-22822?

Versions of the external-secrets package from 0.20.2 up to, but not including, 1.2.0 are affected by CVE-2026-22822.

5

What functionality is exploited by CVE-2026-22822?

CVE-2026-22822 exploits the getSecretKey template function, which can fetch secrets across namespaces improperly.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203