VYPR
Medium severity6.5NVD Advisory· Published Apr 14, 2026· Updated Apr 22, 2026

CVE-2026-34984

CVE-2026-34984

Description

External Secrets Operator reads information from a third-party service and automatically injects the values as Kubernetes Secrets. Versions 2.2.0 and below contain a vulnerability in runtime/template/v2/template.go where the v2 template engine removes env and expandenv from Sprig's TxtFuncMap() but leaves the getHostByName function accessible to user-controlled templates. Since ESO executes templates within the controller process, an attacker who can create or update templated ExternalSecret resources can invoke controller-side DNS lookups using secret-derived values. This creates a DNS exfiltration primitive, allowing fetched secret material to be leaked via DNS queries without requiring direct outbound network access from the attacker's workload. The impact is a confidentiality issue, particularly in environments where untrusted or lower-trust users can author templated ExternalSecret resources and the controller has DNS resolution capability. This issue has been fixed in version 2.3.0.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
github.com/external-secrets/external-secretsGo
< 1.3.3-0.20260331202714-6800989bdc121.3.3-0.20260331202714-6800989bdc12
github.com/external-secrets/external-secretsGo
>= 2.0.0, <= 2.2.0

Affected products

1

Patches

1
6800989bdc12

fix: remove getHostByName from template funcs (#6164)

2 files changed · +7 1
  • runtime/template/v2/template.go+1 1 modified
    @@ -87,7 +87,7 @@ func init() {
     	sprigFuncs := sprig.TxtFuncMap()
     	delete(sprigFuncs, "env")
     	delete(sprigFuncs, "expandenv")
    -
    +	delete(sprigFuncs, "getHostByName")
     	maps.Copy(tplFuncs, sprigFuncs)
     	fs := pflag.NewFlagSet("template", pflag.ExitOnError)
     	fs.StringVar(&leftDelim, "template-left-delimiter", "{{", "templating left delimiter")
    
  • runtime/template/v2/template_test.go+6 0 modified
    @@ -222,6 +222,12 @@ func rsaEncryptOAEP(t testing.TB, publicKeyPEM []byte, hash, plaintext string) [
     	return ciphertext
     }
     
    +func TestFuncMapDoesNotExposeGetHostByName(t *testing.T) {
    +	if _, ok := FuncMap()["getHostByName"]; ok {
    +		t.Fatalf("getHostByName should not be exposed in the template function map")
    +	}
    +}
    +
     func TestExecute(t *testing.T) {
     	tbl := []struct {
     		name                string
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.