Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE-2022-3294: Node address isn't always verified when proxying #113757

Closed
tallclair opened this issue Nov 8, 2022 · 2 comments
Closed

CVE-2022-3294: Node address isn't always verified when proxying #113757

tallclair opened this issue Nov 8, 2022 · 2 comments
Labels
area/apiserver area/security committee/security-response Denotes an issue or PR intended to be handled by the product security committee. kind/bug Categorizes issue or PR as related to a bug. official-cve-feed Issues or PRs related to CVEs officially announced by Security Response Committee (SRC) sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@tallclair
Copy link
Member

tallclair commented Nov 8, 2022

CVSS Rating: CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H

A security issue was discovered in Kubernetes where users may have access to secure endpoints in the control plane network. Kubernetes clusters are only affected if an untrusted user can modify Node objects and send proxy requests to them.

Kubernetes supports node proxying, which allows clients of kube-apiserver to access endpoints of a Kubelet to establish connections to Pods, retrieve container logs, and more. While Kubernetes already validates the proxying address for Nodes, a bug in kube-apiserver made it possible to bypass this validation. Bypassing this validation could allow authenticated requests destined for Nodes to to the API server's private network.

Am I vulnerable?

Clusters are affected by this vulnerability if there are endpoints that the kube-apiserver has connectivity to that users should not be able to access. This includes:

  • kube-apiserver is in a separate network from worker nodes
  • localhost services

mTLS services that accept the same client certificate as nodes may be affected. The severity of this issue depends on the privileges & sensitivity of the exploitable endpoints.

Clusters that configure the egress selector to use a proxy for cluster traffic may not be affected.

Affected Versions

  • Kubernetes kube-apiserver <= v1.25.3
  • Kubernetes kube-apiserver <= v1.24.7
  • Kubernetes kube-apiserver <= v1.23.13
  • Kubernetes kube-apiserver <= v1.22.15

How do I mitigate this vulnerability?

Upgrading the kube-apiserver to a fixed version mitigates this vulnerability.

Aside from upgrading, configuring an egress proxy for egress to the cluster network can mitigate this vulnerability.

Fixed Versions

  • Kubernetes kube-apiserver v1.25.4
  • Kubernetes kube-apiserver v1.24.8
  • Kubernetes kube-apiserver v1.23.14
  • Kubernetes kube-apiserver v1.22.16

Fix impact: In some cases, the fix can break clients that depend on the nodes/proxy subresource, specifically if a kubelet advertises a localhost or link-local address to the Kubernetes control plane.

Detection

Node create & update requests may be included in the Kubernetes audit log, and can be used to identify requests for IP addresses that should not be permitted. Node proxy requests may also be included in audit logs.

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

Acknowledgements

This vulnerability was reported by Yuval Avrahami of Palo Alto Networks.

/area security
/kind bug
/committee security-response
/label official-cve-feed
/sig api-machinery
/area apiserver

@k8s-ci-robot k8s-ci-robot added needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 8, 2022
@tallclair tallclair added the committee/security-response Denotes an issue or PR intended to be handled by the product security committee. label Nov 8, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Nov 8, 2022
@tallclair tallclair changed the title [Reserved] CVE-2022-3294: Node address isn't always verified when proxying Nov 10, 2022
@kubernetes kubernetes deleted a comment from k8s-ci-robot Nov 10, 2022
@tallclair tallclair added kind/bug Categorizes issue or PR as related to a bug. area/security area/apiserver sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. official-cve-feed Issues or PRs related to CVEs officially announced by Security Response Committee (SRC) triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 10, 2022
@HeYuqiu
Copy link

HeYuqiu commented Nov 12, 2022

Does this CVE exist in version 1.20?

chenchun pushed a commit to chenchun/kubernetes that referenced this issue Mar 20, 2024
…quest !1048)

fix node address validation
fix node address validation

Signed-off-by: Andrew Sy Kim <andrewsy@google.com>

kubernetes#113757
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/apiserver area/security committee/security-response Denotes an issue or PR intended to be handled by the product security committee. kind/bug Categorizes issue or PR as related to a bug. official-cve-feed Issues or PRs related to CVEs officially announced by Security Response Committee (SRC) sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants