This the multi-page printable view of this section. Click here to print.
Security Bulletins
- 1: KIALI-SECURITY-003 - Installation into ad-hoc namespaces
- 2: KIALI-SECURITY-002 - Authentication bypass when using the OpenID login strategy
- 3: KIALI-SECURITY-001 - Authentication bypass using forged credentials
1 - KIALI-SECURITY-003 - Installation into ad-hoc namespaces
Description
- Disclosure date: May 11, 2021
- Affected Releases: prior to 1.33.0
- Impact Score: 6.6 - AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:L
A vulnerability was found in the Kiali Operator allowing installation of a specified image into any namespace.
Kiali users are exposed to this vulnerability if all the following conditions are met:
- Kiali operator is used for installation.
- Kiali CR was edited to install an image into an unapproved namespace.
This vulnerability is filed as CVE-2021-3495
Mitigation
If you can update:
- Update to Kiali Operator v1.33.0 or later.
If you can not update:
- Ensure only trusted individuals can create or edit a Kiali CRs (resources of kind “kiali”).
2 - KIALI-SECURITY-002 - Authentication bypass when using the OpenID login strategy
Description
- Disclosure date: March 5, 2021
- Affected Releases: 1.26.0, 1.26.1, 1.26.2, 1.27.0, 1.28.0, 1.28.1, 1.29.0, 1.29.1, 1.30.0
- Impact Score: 7.0 - AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N/E:F/RL:X/RC:C
A vulnerability was found in Kiali allowing an attacker to bypass the authentication mechanism. The vulnerability lets an attacker build forged credentials and use them to gain unauthorized access to Kiali.
Kiali users are exposed to this vulnerability if all the following conditions are met:
- Kiali is setup with the
openid
authentication strategy. - As a result of configurations in both Kiali and your OpenID server, Kiali uses the implicit flow of the OpenID specification to negotiate authentication.
- Kiali is setup with RBAC turned off.
This vulnerability is filed as CVE-2021-20278
Mitigation
If you can update:
- Update to Kiali v1.31.0 or later.
- If you need an earlier version, only Kiali 1.26.3 and 1.29.2 are fixed.
If you are locked with an older version of Kiali, you have three options:
- Configure Kiali to use the authorization code flow of the OpenID specification; or
- Configure Kiali to use the implicit flow of the OpenID specification and enable RBAC; or
- Configure Kiali to use any of the other available authentication mechanisms.
3 - KIALI-SECURITY-001 - Authentication bypass using forged credentials
Description
- Disclosure date: March 25, 2020
- Affected Releases: 0.4.0 to 1.15.0
- Impact Score: 9.4 - AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H
A vulnerability was found in Kiali allowing an attacker to bypass the authentication mechanism. Currently, Kiali has four authentication mechanisms: login, token, openshift and ldap. All are vulnerable.
The vulnerability lets an attacker build forged credentials and use them to gain unauthorized access to Kiali.
Additionally, it was found that Kiali credentials were not being validated properly. Depending on the authentication mechanism configured in Kiali, this could facilitate unauthorized access into Kiali with forged and/or invalid credentials.
These vulnerabilities are filed as CVE-2020-1762 and CVE-2020-1764
Detection
Use the following bash script to check if you are vulnerable:
KIALI_VERSION=$(kubectl get pods -n istio-system -l app=kiali -o yaml | sed -n 's/^.*image: .*:v\(.*\)$/\1/p' | sort -u)
kubectl get deploy kiali -n istio-system -o yaml | grep -q LOGIN_TOKEN_SIGNING_KEY
TEST_KEY_ENV=$?
kubectl get cm kiali -n istio-system -o yaml | grep signing_key | grep -vq kiali
TEST_KEY_CFG=$?
VERSION_ENTRIES=(${KIALI_VERSION//./ })
echo "Your Kiali version found: ${KIALI_VERSION}"
[ ${VERSION_ENTRIES[0]} -lt "1" ] || ([ ${VERSION_ENTRIES[0]} -eq "1" ] && (\
[ ${VERSION_ENTRIES[1]} -lt "15" ] || ([ ${VERSION_ENTRIES[1]} -eq "15" ] && ( \
[ ${VERSION_ENTRIES[2]} -le "0" ])))) && echo "Your Kiali version is vulnerable"
[ $TEST_KEY_ENV -eq 1 ] && [ $TEST_KEY_CFG -eq 1 ] && echo "Your Kiali configuration looks vulnerable"
The script output will be similar to this:
Your Kiali version found: 1.14.0
Your Kiali version is vulnerable
Your Kiali configuration looks vulnerable
Mitigation
- Update to Kiali 1.15.1 or later.
Alternatively, if you cannot update to version 1.15.1, mitigation is possible by setting a secure signing key when deploying Kiali. If you installed via Kiali operator, you could use the following bash script:
SIGN_KEY=$(chars=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890; for i in {1..20}; do echo -n "${chars:RANDOM%${#chars}:1}"; done; echo)
kubectl get kiali -n $(kubectl get kiali --all-namespaces --no-headers -o custom-columns=NS:.metadata.namespace) -o yaml | sed "s/spec:/spec:\n login_token:\n signing_key: $SIGN_KEY/" | kubectl apply -f -
If you installed via Istio helm charts or istioctl
command, you could use the following bash script:
KIALI_INSTALL_NAMESPACE=istio-system
SIGN_KEY=$(chars=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890; for i in {1..20}; do echo -n "${chars:RANDOM%${#chars}:1}"; done; echo)
kubectl get cm kiali -n $KIALI_INSTALL_NAMESPACE -o yaml | sed "s/server:/login_token:\\n signing_key: $SIGN_KEY\\n server:/" | kubectl apply -f -
kubectl delete pod -l app=kiali -n $KIALI_INSTALL_NAMESPACE