|
Message-ID: <CAL7+V1zEJQLeNE2Gm-1SaY4Gv1fRsTTtJNFQVKa85s8H0TyeNw@mail.gmail.com> Date: Thu, 6 Jul 2023 14:27:49 -0700 From: Rita Zhang <rita.z.zhang@...il.com> To: oss-security@...ts.openwall.com Subject: [kubernetes] CVE-2023-2728: Bypassing enforce mountable secrets policy imposed by the ServiceAccount admission plugin Rita Zhang <rita.z.zhang@...il.com> Hello Kubernetes Community, 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 ephemeral containers. 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 <http://kubernetes.io/enforce-mountable-secrets>* annotation are used together with ephemeral containers. This issue has been rated *Medium* ( CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N <https://www.first.org/cvss/calculator/3.1#CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N>), and assigned CVE-2023-2728 *Am I vulnerable?* Clusters are impacted by this vulnerability if all of the following are true: 1. The ServiceAccount admission plugin is used. Most cluster should have this on by default as recommended in https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#serviceaccount 2. The *kubernetes.io/enforce-mountable-secrets <http://kubernetes.io/enforce-mountable-secrets>* annotation is used by a service account. This annotation is not added by default. 3. Pods are using ephemeral containers. *Affected Versions* - kube-apiserver v1.27.0 - v1.27.2 - kube-apiserver v1.26.0 - v1.26.5 - kube-apiserver v1.25.0 - v1.25.10 - kube-apiserver <= v1.24.14 *How do I mitigate this vulnerability?* This issue can be mitigated by applying the patch provided for the kube-apiserver component. The patch prevents ephemeral containers from bypassing the mountable secrets policy enforced by the ServiceAccount admission plugin. *Fixed Versions* - kube-apiserver v1.27.3 - kube-apiserver v1.26.6 - kube-apiserver v1.25.11 - kube-apiserver v1.24.15 These releases have been published today, June 14th, 2023. *Detection* Pod update requests using an ephemeral container that exploits this vulnerability with unintended secret will be captured in API audit logs. You can also use kubectl get pods to find active pods with ephemeral containers running with a secret that is not referenced by the service account in your cluster. *Additional Details* See the GitHub issue for more details: https://github.com/kubernetes/kubernetes/issues/118640 Thank You, Rita Zhang on behalf of the Kubernetes Security Response Committee
Powered by blists - more mailing lists
Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.