What it means for teams

A Kubernetes Secret is base64-encoded, not encrypted, and by default the API server stores it unencrypted in etcd. Every copy of a credential, in an image layer, a log line or an environment dump, is one more place to leak from and one more place a rotation has to reach.

How to prevent it

  • Keep credentials in Kubernetes Secrets or an external secret store, never in images, ConfigMaps or source code, and mount them as files rather than environment variables.
  • Encrypt Secrets at rest in etcd with a KMS provider, and restrict get, list and watch on Secrets with RBAC.
  • Replace static cloud credentials with workload identity federation, and use short-lived service account tokens from the TokenRequest API.
  • Automate rotation, and check that each rotation reaches the running process.

Guides on this site

Practice

References

  1. K03:2025 Secrets Management Failures (OWASP)
  2. Kubernetes documentation: Good practices for Kubernetes Secrets
  3. Kubernetes documentation: Encrypting Confidential Data at Rest

List data from the publisher. A guide is listed as the main subject when the weakness or risk is what the guide is about, and as covering it when a dedicated section or worked example addresses it.

OWASP does not publish a mapping between the 2022 and 2025 lists. The 2022 entry shown for each risk is the one with the same subject, matched by title; 2022's K02 Supply Chain Vulnerabilities has no 2025 counterpart.