{"id":"GHSA-77v3-r3jw-j2v2","revision":"f2f085755d8a41c386eb59c3298b3b45","records":[{"revision":"f2f085755d8a41c386eb59c3298b3b45","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-77v3-r3jw-j2v2","aliases":["CVE-2026-22822","GO-2026-4330"],"title":"External Secrets Operator insecurely retrieves secrets through the getSecretKey templating function","description":"### 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","state":0,"publishedAt":"2026-01-20T16:37:18+00:00","modifiedAt":"2026-04-16T02:14:29.3145869+00:00","affected":[{"ecosystem":"Go","name":"github.com/external-secrets/external-secrets","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.20.2"},{"kind":"fixed","version":"1.2.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","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":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/external-secrets/external-secrets/security/advisories/GHSA-77v3-r3jw-j2v2","https://nvd.nist.gov/vuln/detail/CVE-2026-22822","https://github.com/external-secrets/external-secrets/issues/5690","https://github.com/external-secrets/external-secrets/pull/3895","https://github.com/external-secrets/external-secrets/commit/17d3e22b8d3fbe339faf8515a95ec06ec92b1feb","https://github.com/external-secrets/external-secrets","https://github.com/external-secrets/external-secrets/releases/tag/v1.2.0"],"sourceUrl":"https://github.com/advisories/GHSA-77v3-r3jw-j2v2","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-77v3-r3jw-j2v2","identifiers":["GHSA-77v3-r3jw-j2v2","CVE-2026-22822","GO-2026-4330"]},"retained":false,"historicalAffected":[]}],"coverage":[]}