[Security Advisory] CVE-2020-8554: Man in the middle using LoadBalancer or ExternalIPs
DRANK

Hello Kubernetes Community,A security issue was discovered with Kubernetes affecting multitenant clusters. If a potential attacker can already create or edit services and pods, then they may be able to intercept traffic from other pods (or nodes) in the cluster.This issue has been ratedmediumseverity (CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L), and assignedCVE-2020-8554.An attacker that is able to create a ClusterIP service and set the spec.externalIPs field can intercept traffic to that IP. An attacker that is able to patch the status (which is considered a privileged operation and should not typically be granted to users) of a LoadBalancer service can set the status.loadBalancer.ingress.ip to similar effect.This issue is a design flaw that cannot be mitigated without user-facing changes. With this public announcement, we can begin conversations about a long-term fix.Affected Components and ConfigurationsAll Kubernetes versions are affected. Multi-tenant clusters that grant tenant…

groups.google.com
Related Topics: Security
3 comments
  • CVE の情報が出たとき、一般には内容を理解するのに専門的な知識が必要でハードルが高い感じがしますが、今回のはものすごく単純で、だからこそ上手く防ぐ方法がないというのは面白い感じ。

    Service の ExternalIP は「クラスタ内でその IP に向けた通信は自分に向けたものと見做すことができる」という機能で、攻撃者が Service を作成できる状況だと通信を吸い取って中間者攻撃ができるようです。

    Kubenetes 自体にパッチを当てて修正するのは難しいので、Validating Admission Control Webhook で防ぐように、とのこと。OPA Gatekeeper 用の Rego ルールも提供されています。

  • CVE-2020-8554 で Kubernetes での中間者攻撃の脆弱性が報告されている。攻撃者が Service オブジェクトの作成、更新の権限を持っていれば Service spec.externalIPs フィールドを使用して他の Pod やノードへの通信を盗聴できるというもの。クラスタをマルチテナントで提供している場合に影響が大きい。対象はすべての Kubernetes バージョンで、根本的な修正は大きな変更が伴うことからパッチが提供されていない。そのため、対策のための Admission Webhook と OPA のサンプル実装が提供されている。