Executive brief
ExternalSecrets is a Kubernetes operator that integrates external secret management systems like AWS Secrets Manager or HashiCorp Vault with Kubernetes. A vulnerability allows users with limited permissions to trick the operator into creating long-lived authentication tokens for other service accounts. This could allow an attacker to impersonate more privileged accounts within the same namespace, potentially leading to unauthorized access to sensitive data or operations.
Technical details
An authorization bypass exists in ExternalSecrets where a user with permission to create ExternalSecret resources can manipulate templates to target specific secret types. By crafting a template that targets the Service Account token secret type, the operator can be forced to create a Secret that Kubernetes automatically populates with a long-lived token for a specified service account. This allows for service account impersonation without the attacker having direct 'TokenRequest' or 'Secret' creation permissions. The vulnerability is mitigated by the requirement that the attacker must already have significant permissions within the namespace and that the target Service Account must be misconfigured. The issue is fixed in version 2.4.1 by disallowing these template combinations.
Affected products
- ExternalSecrets ExternalSecrets >= 0.1.0, < 2.4.1
Timeline
- 2026-05-05: disclosed
- 2026-05-08: advisory
- 2026-05-08: patched: Fixed in version 2.4.1
References
- https://api.github.com/users/factory-nizar
- https://github.com/factory-nizar
- https://api.github.com/users/factory-nizar/gists%7B/gist_id%7D
- https://api.github.com/users/factory-nizar/repos
- https://avatars.githubusercontent.com/u/265105975?v=4
- https://api.github.com/users/factory-nizar/events%7B/privacy%7D