Bug 2211348 (CVE-2023-2728) - CVE-2023-2728 kube-apiserver: Bypassing enforce mountable secrets policy imposed by the ServiceAccount admission plugin
Summary: CVE-2023-2728 kube-apiserver: Bypassing enforce mountable secrets policy impo...
Keywords:
Status: NEW
Alias: CVE-2023-2728
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: 2215201 2215203
Blocks: 2209134
TreeView+ depends on / blocked
 
Reported: 2023-05-31 07:55 UTC by Avinash Hanwate
Modified: 2024-02-13 21:38 UTC (History)
6 users (show)

Fixed In Version: kube-apiserver 1.27.3, kube-apiserver 1.26.6, kube-apiserver 1.25.11, kube-apiserver 1.24.15
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found 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 that 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.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2023:5008 0 None None None 2023-10-31 14:20:09 UTC

Description Avinash Hanwate 2023-05-31 07:55:20 UTC
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 
      https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#serviceaccount
   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.

Comment 3 Avinash Hanwate 2023-06-15 05:43:52 UTC
Created golang-k8s-kubernetes tracking bugs for this issue:

Affects: fedora-all [bug 2215201]


Created origin tracking bugs for this issue:

Affects: fedora-all [bug 2215203]

Comment 6 errata-xmlrpc 2023-10-31 14:20:08 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.14

Via RHSA-2023:5008 https://access.redhat.com/errata/RHSA-2023:5008


Note You need to log in before you can comment on or make changes to this bug.