External Secrets Operator has DNS-based secret exfiltration via getHostByName in External Secrets v2 template engine
High severity
GitHub Reviewed
Published
Apr 11, 2026
in
external-secrets/external-secrets
•
Updated Apr 13, 2026
Package
Affected versions
< 1.3.3-0.20260331202714-6800989bdc12
>= 2.0.0, <= 2.2.0
Patched versions
1.3.3-0.20260331202714-6800989bdc12
Description
Published to the GitHub Advisory Database
Apr 13, 2026
Reviewed
Apr 13, 2026
Last updated
Apr 13, 2026
Summary
The v2 template engine in
runtime/template/v2/template.goimports Sprig’sTxtFuncMap()and removesenvandexpandenv, but leavesgetHostByNameavailable to user-controlled templates. Because ESO executes templates inside the controller process, an attacker who can create or update templated ExternalSecret resources can trigger controller-side DNS lookups using secret-derived values, creating a DNS exfiltration primitive.Impact
This is a confidentiality issue. In environments where untrusted or lower-trust users can author templated ExternalSecret resources and the controller can perform DNS resolution, fetched secret material can be exfiltrated through DNS without requiring direct outbound access from the attacker’s workload.
References