← 返回列表

CVE-2024-3177

单站 Kubernetes Vulnerability Announcements 发布 Tue, 16 Apr 2024 14:04:09 +0000 入库 2026-11-18T06:56:48

Repository navigation

area/apiserver

area/security

committee/security-responseDenotes an issue or PR intended to be handled by the product security committee.Denotes an issue or PR intended to be handled by the product security committee.

kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.

lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.

official-cve-feedIssues or PRs related to CVEs officially announced by Security Response Committee (SRC)Issues or PRs related to CVEs officially announced by Security Response Committee (SRC)

sig/authCategorizes an issue or PR as relevant to SIG Auth.Categorizes an issue or PR as relevant to SIG Auth.

triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.

Description

on Apr 16, 2024

CVSS Rating: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N - Low (2.7)

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.

Am I vulnerable?

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

The kubernetes.io/enforce-mountable-secrets annotation is used by a service account. This annotation is not added by default. Pods using containers, init containers, and ephemeral containers with the envFrom field populated.

Affected Versions

kube-apiserver v1.29.0 - v1.29.3

kube-apiserver v1.28.0 - v1.28.8

kube-apiserver \<= v1.27.12

How do I mitigate this vulnerability?

This issue can be mitigated by applying the patch provided for the kube-apiserver component. The patch prevents containers, init containers, and ephemeral containers with the envFrom field populated from bypassing the mountable secrets policy enforced by the ServiceAccount admission plugin.

Outside of applying the provided patch, there are no known mitigations to this vulnerability.

Fixed Versions

To upgrade, refer to the documentation:

https://kubernetes.io/docs/tasks/administer-cluster/cluster-upgrade/

Detection

Pod update requests using a container, init container, or ephemeral container with the envFrom field populated that exploits this vulnerability with unintended secret will be captured in API audit logs. You can also use the following kubectl command to find active pods using the kubernetes.io/enforce-mountable-secrets annotation.

kubectl get serviceaccounts --all-namespaces -o jsonpath="{range .items[?(@.metadata.annotations['kubernetes\.io/enforce-mountable-secrets']=='true')]}{.metadata.namespace}{'\t'}{.metadata.name}{'\n'}{end}"

If you find evidence that this vulnerability has been exploited, please contact security@kubernetes.io

Acknowledgements

This vulnerability was reported by tha3e1vl.

The issue was fixed and coordinated by the fix team:

Rita Zhang @ritazh

Joel Smith @joelsmith

Mo Khan @enj

and release managers:

Sascha Grunert @saschagrunert

Jeremy Rickard @jeremyrickard

/triage accepted

/lifecycle frozen

/area security

/kind bug

/committee security-response

Activity

  1. k8s-ci-robotadded lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.committee/security-responseDenotes an issue or PR intended to be handled by the product security committee.Denotes an issue or PR intended to be handled by the product security committee.on Apr 16, 2024
  2. ritazh commentedon Apr 16, 2024 MemberAuthorMore actions /label official-cve-feed


    /area apiserver
    /sig auth
    Reacted by Icaro Lordes
  3. k8s-ci-robotadded sig/authCategorizes an issue or PR as relevant to SIG Auth.Categorizes an issue or PR as relevant to SIG Auth.on Apr 16, 2024
  4. github-project-automationadded this to SIG Authon Apr 16, 2024
  5. k8s-ci-robotadded official-cve-feedIssues or PRs related to CVEs officially announced by Security Response Committee (SRC)Issues or PRs related to CVEs officially announced by Security Response Committee (SRC)on Apr 16, 2024
  6. github-project-automationmoved this to Needs Triage in SIG Authon Apr 16, 2024
  7. ritazhchanged the title ~~[-]PLACEHOLDER ISSUE[/-]~~ [+]CVE-2024-3177: Bypassing mountable secrets policy imposed by the ServiceAccount admission plugin[/+] on Apr 16, 2024
  8. ritazhclosed this as completedon Apr 18, 2024
  9. github-project-automationmoved this from Needs Triage to Closed / Done in SIG Authon Apr 18, 2024
  10. doanacadded a commit that references this issue on Jan 6, 2026
  11. jpuhlmanadded a commit that references this issue on Jan 20, 2026

Metadata

Metadata

Assignees

Labels

area/apiserver

area/security

committee/security-responseDenotes an issue or PR intended to be handled by the product security committee.Denotes an issue or PR intended to be handled by the product security committee.

kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.

lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.

official-cve-feedIssues or PRs related to CVEs officially announced by Security Response Committee (SRC)Issues or PRs related to CVEs officially announced by Security Response Committee (SRC)

sig/authCategorizes an issue or PR as relevant to SIG Auth.Categorizes an issue or PR as relevant to SIG Auth.

triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.

Type

Projects

原文链接:https://github.com/kubernetes/kubernetes/issues/124336