CVE-2024-3177
Low · 2.7CVSS
2.7
EPSS
2.2%
Published
Apr 22, 2024
CISA due date
—
Cloudanix analysis
Kubernetes may let some containers read secrets they are not supposed to access, which could allow sensitive credentials to leak if the cluster uses a specific policy setting.
- Exploitation
- Remote Authenticated
- Attacker needs
- High Privilege
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Other
- Class
- Authorization Bypass
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The flaw permits containers, init containers, and ephemeral containers that populate the envFrom field to reference secrets outside those listed in the service account's secrets field, bypassing the ServiceAccount admission plugin's mountable-secrets enforcement when the kubernetes.io/enforce-mountable-secrets annotation is present.
Why it matters to the business
Organizations may experience unauthorized exposure of secrets used by service accounts, increasing the risk of credential leakage and downstream cluster compromise in environments that rely on this policy for isolation.
How an attack unfolds
An attacker with permissions to create or modify pods submits a manifest that uses envFrom to inject environment variables from secrets not permitted by the service account; the admission plugin fails to enforce the policy for this field combination, allowing the pod to start with the unauthorized secrets mounted.
How to fix it
Upgrade Kubernetes clusters to a version that corrects the envFrom handling in the ServiceAccount admission plugin; until patches are available, avoid combining the enforce-mountable-secrets annotation with workloads that use envFrom or migrate to explicit env references listed in the service account.
How to confirm the fix worked
Audit existing pod and workload definitions for envFrom usage against service accounts that carry the enforce-mountable-secrets annotation; re-test the admission plugin behavior after applying updates by attempting to schedule a pod that references a non-listed secret.
Typical attack path
- Locate service accounts annotated with kubernetes.io/enforce-mountable-secrets
- Craft a pod, init container, or ephemeral container spec that references restricted secrets via envFrom
- Submit the pod to the API server
- Read the injected environment variables or mounted secrets from the running container
How to detect it
Search Kubernetes audit logs for pod creation or update events that include envFrom fields on pods associated with service accounts carrying the enforce-mountable-secrets annotation; correlate with API server admission decisions and subsequent secret volume mounts or environment variable reads inside containers.
What your security team should do
- Inventory all service accounts using the enforce-mountable-secrets annotation and identify workloads that employ envFrom
- Temporarily restrict pod creation privileges or add validating admission webhooks that block envFrom in annotated namespaces
- Monitor release notes for the corrected Kubernetes versions and schedule upgrades according to internal change windows
- Review RBAC rules that allow pod creation to limit the blast radius of the bypass
The record
A security issue was discovered in Kubernetes where users may be able to launch containers that bypass the mountable secrets policy enforced by the ServiceAccount admission plugin when using containers, init containers, and ephemeral containers with the envFrom field populated. The policy ensures pods running with a service account may only reference secrets specified in the service account’s secrets field. Kubernetes clusters are only affected if the ServiceAccount admission plugin and the kubernetes.io/enforce-mountable-secrets annotation are used together with containers, init containers, and ephemeral containers with the envFrom field populated.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Go | k8s.io/kubernetes | 0 | 1.27.13 |
| Go | k8s.io/kubernetes | 1.28.0 | 1.28.9 |
| Go | k8s.io/kubernetes | 1.29.0 | 1.29.4 |
| Chainguard | argocd-image-updater | 0 | 0.17.0-r1 |
| Chainguard | argocd-image-updater-compat | 0 | 0.17.0-r1 |
| Chainguard | argocd-image-updater-fips | 0 | 0.17.0-r2 |
| Chainguard | aws-ebs-csi-driver | 0 | 1.30.0-r0 |
| Chainguard | aws-ebs-csi-driver-1.18 | 0 | 1.18.0-r16 |
| Chainguard | aws-ebs-csi-driver-1.19 | 0 | 1.19.0-r15 |
| Chainguard | aws-ebs-csi-driver-fips | 0 | 1.30.0-r0 |
| Chainguard | aws-efs-csi-driver | 0 | 2.1.1-r0 |
| Chainguard | aws-efs-csi-driver-fips | 0 | 1.7.0-r9 |
| Chainguard | aws-efs-csi-driver-fips | 0 | 2.1.14-r1 |
| Chainguard | aws-efs-csi-driver-fips-1.6 | 0 | 1.6.0-r9 |
| Chainguard | calico | 0 | 3.28.0-r0 |
| Chainguard | calico-apiserver | 0 | 3.28.0-r0 |
| Chainguard | calico-app-policy | 0 | 3.28.0-r0 |
| Chainguard | calico-cni | 0 | 3.28.0-r0 |
| Chainguard | calico-cni-compat | 0 | 3.28.0-r0 |
| Chainguard | calico-cni-fips-compat | 0 | 3.28.0-r0 |
| Chainguard | calico-felix | 0 | 3.28.0-r0 |
| Chainguard | calico-fips | 0 | 3.28.0-r0 |
| Chainguard | calico-fips-3.25 | 0 | 3.25.2-r5 |
| Chainguard | calico-fips-apiserver | 0 | 3.28.0-r0 |
| Chainguard | calico-fips-app-policy | 0 | 3.28.0-r0 |
| Chainguard | calico-fips-cni | 0 | 3.28.0-r0 |
| Chainguard | calico-fips-felix | 0 | 3.28.0-r0 |
| Chainguard | calico-fips-key-cert-provisioner | 0 | 3.28.0-r0 |
| Chainguard | calico-fips-kube-controllers | 0 | 3.28.0-r0 |
| Chainguard | calico-fips-node | 0 | 3.28.0-r0 |
| Chainguard | calico-fips-pod2daemon | 0 | 3.28.0-r0 |
| Chainguard | calico-fips-typha-client | 0 | 3.28.0-r0 |
| Chainguard | calico-fips-typhad | 0 | 3.28.0-r0 |
| Chainguard | calico-key-cert-provisioner | 0 | 3.28.0-r0 |
| Chainguard | calico-kube-controllers | 0 | 3.28.0-r0 |
| Chainguard | calico-node | 0 | 3.28.0-r0 |
| Chainguard | calico-pod2daemon | 0 | 3.28.0-r0 |
| Chainguard | calico-pod2daemon-flexvol-compat | 0 | 3.28.0-r0 |
| Chainguard | calico-typha-client | 0 | 3.28.0-r0 |
| Chainguard | calico-typhad | 0 | 3.28.0-r0 |
| Chainguard | calicoctl | 0 | 3.28.0-r0 |
| Chainguard | calicoctl-fips | 0 | 3.28.0-r0 |
| Chainguard | cluster-autoscaler-1.25 | 0 | 0 |
| Chainguard | cluster-autoscaler-1.25-compat | 0 | 0 |
| Chainguard | cluster-autoscaler-1.26 | 0 | 0 |
| Chainguard | cluster-autoscaler-1.26-compat | 0 | 0 |
| Chainguard | cluster-autoscaler-1.27 | 0 | 1.27.7-r2 |
| Chainguard | cluster-autoscaler-1.27-compat | 0 | 1.27.7-r2 |
| Chainguard | cluster-autoscaler-1.28 | 0 | 1.28.4-r2 |
| Chainguard | cluster-autoscaler-1.28-compat | 0 | 1.28.4-r2 |
| Chainguard | cluster-autoscaler-1.29 | 0 | 1.29.2-r2 |
| Chainguard | cluster-autoscaler-1.29-compat | 0 | 1.29.2-r2 |
| Chainguard | cluster-autoscaler-fips-1.26 | 0 | 0 |
| Chainguard | cluster-autoscaler-fips-1.26-compat | 0 | 0 |
| Chainguard | cluster-autoscaler-fips-1.27 | 0 | 1.27.7-r2 |
| Chainguard | cluster-autoscaler-fips-1.27-compat | 0 | 1.27.7-r2 |
| Chainguard | cluster-autoscaler-fips-1.28 | 0 | 1.28.4-r2 |
| Chainguard | cluster-autoscaler-fips-1.28-compat | 0 | 1.28.4-r2 |
| Chainguard | cluster-autoscaler-fips-1.29 | 0 | 1.29.2-r2 |
| Chainguard | cluster-autoscaler-fips-1.29-compat | 0 | 1.29.2-r2 |
| Chainguard | ip-masq-agent | 0 | 2.9.3-r10 |
| Chainguard | kube-apiserver-1.27 | 0 | 1.27.13-r0 |
| Chainguard | kube-apiserver-1.27-default | 0 | 1.27.13-r0 |
| Chainguard | kube-apiserver-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kube-apiserver-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kube-apiserver-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kube-apiserver-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kube-apiserver-fips-1.27 | 0 | 1.27.14-r0 |
| Chainguard | kube-apiserver-fips-1.27-default | 0 | 1.27.14-r0 |
| Chainguard | kube-apiserver-fips-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kube-apiserver-fips-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kube-apiserver-fips-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kube-apiserver-fips-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kube-controller-manager-1.27 | 0 | 1.27.13-r0 |
| Chainguard | kube-controller-manager-1.27-default | 0 | 1.27.13-r0 |
| Chainguard | kube-controller-manager-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kube-controller-manager-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kube-controller-manager-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kube-controller-manager-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kube-controller-manager-fips-1.27 | 0 | 1.27.14-r0 |
| Chainguard | kube-controller-manager-fips-1.27-default | 0 | 1.27.14-r0 |
| Chainguard | kube-controller-manager-fips-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kube-controller-manager-fips-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kube-controller-manager-fips-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kube-controller-manager-fips-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kube-proxy-1.27 | 0 | 1.27.13-r0 |
| Chainguard | kube-proxy-1.27-default | 0 | 1.27.13-r0 |
| Chainguard | kube-proxy-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kube-proxy-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kube-proxy-1.28-default-compat | 0 | 1.28.9-r0 |
| Chainguard | kube-proxy-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kube-proxy-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kube-proxy-1.29-default-compat | 0 | 1.29.4-r0 |
| Chainguard | kube-proxy-fips-1.27 | 0 | 1.27.14-r0 |
| Chainguard | kube-proxy-fips-1.27-default | 0 | 1.27.14-r0 |
| Chainguard | kube-proxy-fips-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kube-proxy-fips-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kube-proxy-fips-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kube-proxy-fips-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kube-scheduler-1.27 | 0 | 1.27.13-r0 |
| Chainguard | kube-scheduler-1.27-default | 0 | 1.27.13-r0 |
| Chainguard | kube-scheduler-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kube-scheduler-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kube-scheduler-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kube-scheduler-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kube-scheduler-fips-1.27 | 0 | 1.27.14-r0 |
| Chainguard | kube-scheduler-fips-1.27-default | 0 | 1.27.14-r0 |
| Chainguard | kube-scheduler-fips-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kube-scheduler-fips-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kube-scheduler-fips-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kube-scheduler-fips-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kubeadm-1.27 | 0 | 1.27.13-r0 |
| Chainguard | kubeadm-1.27-default | 0 | 1.27.13-r0 |
| Chainguard | kubeadm-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kubeadm-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kubeadm-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kubeadm-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kubeadm-fips-1.27 | 0 | 1.27.14-r0 |
| Chainguard | kubeadm-fips-1.27-default | 0 | 1.27.14-r0 |
| Chainguard | kubeadm-fips-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kubeadm-fips-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kubeadm-fips-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kubeadm-fips-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kubectl-1.27 | 0 | 1.27.13-r0 |
| Chainguard | kubectl-1.27-default | 0 | 1.27.13-r0 |
| Chainguard | kubectl-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kubectl-1.28-bitnami-compat | 0 | 1.28.9-r0 |
| Chainguard | kubectl-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kubectl-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kubectl-1.29-bitnami-compat | 0 | 1.29.4-r0 |
| Chainguard | kubectl-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kubectl-1.29-iamguarded-compat | 0 | 1.29.4-r0 |
| Chainguard | kubectl-bash-completion-1.27 | 0 | 1.27.13-r0 |
| Chainguard | kubectl-bash-completion-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kubectl-bash-completion-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kubectl-bash-completion-fips-1.27 | 0 | 1.27.14-r0 |
| Chainguard | kubectl-bash-completion-fips-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kubectl-bash-completion-fips-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kubectl-fips-1.27 | 0 | 1.27.14-r0 |
| Chainguard | kubectl-fips-1.27-default | 0 | 1.27.14-r0 |
| Chainguard | kubectl-fips-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kubectl-fips-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kubectl-fips-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kubectl-fips-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kubeflow-pipelines | 0 | 2.0.5-r7 |
| Chainguard | kubeflow-pipelines | 0 | 2.14.3-r3 |
| Chainguard | kubeflow-pipelines-apiserver | 0 | 2.14.3-r3 |
| Chainguard | kubeflow-pipelines-cache-deployer | 0 | 2.14.3-r3 |
| Chainguard | kubeflow-pipelines-cache-deployer-compat | 0 | 2.14.3-r3 |
| Chainguard | kubeflow-pipelines-cache_server | 0 | 2.14.3-r3 |
| Chainguard | kubeflow-pipelines-frontend | 0 | 2.14.3-r3 |
| Chainguard | kubeflow-pipelines-metadata-envoy-config | 0 | 2.14.3-r3 |
| Chainguard | kubeflow-pipelines-metadata-writer | 0 | 2.14.3-r3 |
| Chainguard | kubeflow-pipelines-metadata-writer-compat | 0 | 2.14.3-r3 |
| Chainguard | kubeflow-pipelines-persistence_agent | 0 | 2.14.3-r3 |
| Chainguard | kubeflow-pipelines-scheduledworkflow | 0 | 2.14.3-r3 |
| Chainguard | kubeflow-pipelines-viewer-crd-controller | 0 | 2.14.3-r3 |
| Chainguard | kubelet-1.27 | 0 | 1.27.13-r0 |
| Chainguard | kubelet-1.27-default | 0 | 1.27.13-r0 |
| Chainguard | kubelet-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kubelet-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kubelet-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kubelet-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kubelet-fips-1.27 | 0 | 1.27.14-r0 |
| Chainguard | kubelet-fips-1.27-default | 0 | 1.27.14-r0 |
| Chainguard | kubelet-fips-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kubelet-fips-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kubelet-fips-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kubelet-fips-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kubernetes-1.27 | 0 | 1.27.13-r0 |
| Chainguard | kubernetes-1.27-default | 0 | 1.27.13-r0 |
| Chainguard | kubernetes-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kubernetes-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kubernetes-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kubernetes-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kubernetes-csi-driver-hostpath | 0 | 1.13.0-r3 |
| Chainguard | kubernetes-dns-node-cache | 0 | 1.23.0-r5 |
| Chainguard | kubernetes-fips-1.27 | 0 | 1.27.14-r0 |
| Chainguard | kubernetes-fips-1.27-default | 0 | 1.27.14-r0 |
| Chainguard | kubernetes-fips-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kubernetes-fips-1.28-default | 0 | 1.28.9-r0 |
| Chainguard | kubernetes-fips-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kubernetes-fips-1.29-default | 0 | 1.29.4-r0 |
| Chainguard | kubernetes-pause-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kubernetes-pause-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kubernetes-pause-3.9 | 0 | 1.29.4-r0 |
| Chainguard | kubernetes-pause-3.9 | 0 | 1.28.9-r0 |
| Chainguard | kubernetes-pause-compat-1.28 | 0 | 1.28.9-r0 |
| Chainguard | kubernetes-pause-compat-1.29 | 0 | 1.29.4-r0 |
| Chainguard | kubernetes-pause-fips-3.9 | 0 | 1.29.4-r0 |
| Chainguard | kubernetes-pause-fips-3.9 | 0 | 1.28.9-r0 |
| Chainguard | local-static-provisioner | 0 | 2.7.0-r1 |
| Chainguard | local-static-provisioner-compat | 0 | 2.7.0-r1 |
| Chainguard | local-volume-node-cleanup | 0 | 2.7.0-r1 |
| Chainguard | local-volume-node-cleanup-compat | 0 | 2.7.0-r1 |
| Chainguard | node-feature-discovery-0.14 | 0 | 0.14.6-r2 |
| Chainguard | node-feature-discovery-0.15 | 0 | 0.15.4-r2 |
| Chainguard | nodetaint | 0 | 0.0.4-r16 |
| Chainguard | rancher-webhook-0.4 | 0 | 0.4.9-r1 |
| Chainguard | rancher-webhook-0.4 | 0 | 0.4.18-r6 |
Related vulnerabilities
- CVE-2025-13281 A half-blind Server Side Request Forgery (SSRF) vulnerability exists in… Also affects k8s.io/kubernetes
- CVE-2024-10220 The Kubernetes kubelet component allows arbitrary command execution via specially crafted… Also affects k8s.io/kubernetes
- CVE-2024-5321 A security issue was discovered in Kubernetes clusters with Windows nodes where… Also affects k8s.io/kubernetes
- CVE-2019-11253 Improper input validation in the Kubernetes API server in versions v1.0-1.12 and versions… Also affects k8s.io/kubernetes
- CVE-2026-34165 go-git is an extensible git implementation library written in pure Go. Also affects argocd-image-updater
- CVE-2026-33762 go-git is an extensible git implementation library written in pure Go. Also affects argocd-image-updater
- CVE-2026-33186 gRPC-Go is the Go language implementation of gRPC. Also affects argocd-image-updater
- CVE-2026-27142 Actions which insert URLs into the content attribute of HTML meta tags are not escaped. Also affects argocd-image-updater