External Secrets Operator insecurely retrieves secrets through the getSecretKey templating function
Critical severity
GitHub Reviewed
Published
Jan 20, 2026
in
external-secrets/external-secrets
•
Updated Jan 22, 2026
Package
Affected versions
>= 0.20.2, < 1.2.0
Patched versions
1.2.0
Description
Published to the GitHub Advisory Database
Jan 20, 2026
Reviewed
Jan 20, 2026
Published by the National Vulnerability Database
Jan 21, 2026
Last updated
Jan 22, 2026
Summary
The
getSecretKeytemplate 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
sourceReflike explained here: external-secrets/external-secrets#5690 (comment))Impact
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
getSecretKeyin any ExternalSecret resource.Details
See also:
References