Site icon API Security Blog

Security Bulletin: IBM Cloud Kubernetes Service is affected by an endpoint resource security design flaw in Kubernetes (CVE-2021-25740)

## Summary

IBM Cloud Kubernetes Service is affected by an endpoint resource security design flaw in Kubernetes. If a potential attacker can create or edit Endpoints or EndpointSlices in the Kubernetes API, they can potentially direct a LoadBalancer or Ingress implementation to expose backend IPs the attacker should not have access to (CVE-2021-25740).

## Vulnerability Details

CVEID: [CVE-2021-25740]()
Description: Kubernetes could allow a remote authenticated attacker to obtain sensitive information, caused by a confused deputy attack. By sending a specially-crafted request to create or edit Endpoints or EndpointSlices in the Kubernetes API, an attacker could exploit this vulnerability to obtain backend IPs information, and use this information to launch further attacks against the affected system.
CVSS Base Score: 3.1
CVSS Temporal Score: https://exchange.xforce.ibmcloud.com/vulnerabilities/205570 for more information
CVSS Vector: (CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N)

## Affected Products and Versions

IBM Cloud Kubernetes Service: All versions

## Remediation/Fixes

This is a design flaw in Kubernetes that has not been fully mitigated.

## Workarounds and Mitigations

Run the following command against your cluster to check if the mitigation has been applied. By default, IBM Cloud Kubernetes Service clusters **created** with version 1.22 or later have the mitigation. Clusters upgraded to version 1.22 or later are **not** automatically fixed.

kubectl get clusterrole system:aggregate-to-edit -o jsonpath='{.rules}’ | grep endpoints

If the command output **does not** contain `endpoints`, then your cluster **has** the mitigation. **No further action is required.**

If the command output **does** contain `endpoints`, then continue with the mitigation steps.

**Mitigation: All IBM Cloud Kubernetes Service versions**

Remove the `endpoints` permission from the `system:aggregate-to-edit` cluster role.

kubectl edit clusterrole/system:aggregate-to-edit

Next, follow the appropriate instructions below based on your cluster version.

**Mitigation: IBM Cloud Kubernetes Service versions 1.21 and earlier**

Prevent [Kubernetes from reconciling the permissions]() of the `system:aggregate-to-edit` cluster role.

kubectl annotate –overwrite clusterrole/system:aggregate-to-edit rbac.authorization.kubernetes.io/autoupdate=false

When you are ready to upgrade your cluster to version 1.22, be sure to follow [1.22 version information and update actions]() which provides instructions for allowing Kubernetes to reconcile permissions again.

**Mitigation: IBM Cloud Kubernetes Service versions 1.22 and later**

If your cluster does not require any customizations to the `system:aggregate-to-edit` cluster role, besides removing the `endpoints` permission, allow [Kubernetes to reconcile the permissions]().

kubectl annotate –overwrite clusterrole/system:aggregate-to-edit rbac.authorization.kubernetes.io/autoupdate=true

## Monitor IBM Cloud Status for Future Security Bulletins

Monitor the [security notifications]() on the IBM Cloud Status page to be advised of future security bulletins.

### References

[Complete CVSS v3 Guide]( “Link resides outside of ibm.com” )
[On-line Calculator v3]( “Link resides outside of ibm.com” )

Off

[[Security Advisory] CVE-2021-25740: Endpoint & EndpointSlice permissions allow cross-Namespace forwarding]()

## Related Information

[IBM Secure Engineering Web Portal]()
[IBM Product Security Incident Response Blog]()

*The CVSS Environment Score is customer environment specific and will ultimately impact the Overall CVSS Score. Customers can evaluate the impact of this vulnerability in their environments by accessing the links in the Reference section of this Security Bulletin.

## Disclaimer

According to the Forum of Incident Response and Security Teams (FIRST), the Common Vulnerability Scoring System (CVSS) is an “industry open standard designed to convey vulnerability severity and help to determine urgency and priority of response.” IBM PROVIDES THE CVSS SCORES “”AS IS”” WITHOUT WARRANTY OF ANY KIND, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. CUSTOMERS ARE RESPONSIBLE FOR ASSESSING THE IMPACT OF ANY ACTUAL OR POTENTIAL SECURITY VULNERABILITY.

[{“Business Unit”:{“code”:”BU059″,”label”:”IBM Software w/o TPS”},”Product”:{“code”:”SSJTBP”,”label”:”IBM Cloud Kubernetes Service”},”Component”:”–“,”Platform”:[{“code”:”PF025″,”label”:”Platform Independent”}],”Version”:”All Versions”,”Edition”:””,”Line of Business”:{“code”:”LOB21″,”label”:”Public Cloud Platform”}}]Read More

Exit mobile version