CWE
20
Advisory Published
CVE Published
Updated

CVE-2023-2728: Bypassing enforce mountable secrets policy imposed by the ServiceAccount admission plugin

First published: Wed May 31 2023(Updated: )

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* annotation are used together with ephemeral containers. This issue affects kube-apiserver. Clusters are impacted by this vulnerability if: 1. The ServiceAccount admission plugin is used. Most clusters should have this on by default as recommended in <a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#serviceaccount">https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#serviceaccount</a> 2. The *kubernetes.io/enforce-mountable-secrets* annotation is used by a service account. This annotation is not added by default. 3. Pods using ephemeral containers.

Credit: jordan@liggitt.net jordan@liggitt.net

Affected SoftwareAffected VersionHow to fix
Kubernetes Kubernetes<=1.24.14
Kubernetes Kubernetes>=1.25.0<=1.25.10
Kubernetes Kubernetes>=1.26.0<=1.26.5
Kubernetes Kubernetes>=1.27.0<=1.27.2
redhat/kube-apiserver<1.27.3
1.27.3
redhat/kube-apiserver<1.26.6
1.26.6
redhat/kube-apiserver<1.25.11
1.25.11
redhat/kube-apiserver<1.24.15
1.24.15

Remedy

To mitigate this vulnerability, upgrade Kubernetes: https://kubernetes.io/docs/tasks/administer-cluster/cluster-management/#upgrading-a-cluster https://kubernetes.io/docs/tasks/administer-cluster/cluster-management/#upgrading-a-cluster

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the vulnerability ID for this issue?

    The vulnerability ID for this issue is CVE-2023-2728.

  • What is the title of this vulnerability?

    The title of this vulnerability is 'Users may be able to launch containers that bypass the mountable secrets policy enforced by the ServiceAccount admission plugin when using ephemeral containers'.

  • What is the severity of CVE-2023-2728?

    The severity of CVE-2023-2728 is medium with a severity value of 6.5.

  • Which versions of Kubernetes are affected by CVE-2023-2728?

    Kubernetes versions 1.24.14, 1.25.0 to 1.25.10, 1.26.0 to 1.26.5, and 1.27.0 to 1.27.2 are affected by CVE-2023-2728.

  • How can the bypass of the mountable secrets policy be fixed?

    A fix for the bypass of the mountable secrets policy is not currently available. It is recommended to update to a patched version of Kubernetes when it becomes available.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203