CVE-2020-1764

Description

A hard-coded cryptographic key vulnerability in the default configuration file was found in Kiali. A remote attacker could abuse this flaw by creating their own JWT signed tokens and bypass Kiali authentication mechanisms, possibly gaining privileges to view and alter the Istio configuration.

Statement

If exploited, an attacker can perform all Kiali admin functions via the API including:

  • View the logs of a pod
  • View Istio metrics, tracing etc.
  • Alter Istio routing configurations:
    • Change the pod availability: adding variances to the weighting, i.e. all traffic goes to 1 pod, or 95% of all traffic.
    • Prevent traffic reaching a pod, DoS

Whilst OpenShift ServiceMesh Kiali uses the default signing key for JWT cookies, it also includes an access_token. This token is generated with a successful login and cannot be easily determined.

To access the Kiali API in this case, a valid session token would need to be captured first and then added to the JWT cookie.

Mitigation

The Kiali configuration can be manually updated for ServiceMesh so that the default signing_key cannot be easily determined:

oc get kiali -n $(oc get kiali --all-namespaces --no-headers -o custom-columns=NS:.metadata.namespace) -o yaml | sed "s/spec:/spec:\n login_token:\n signing_key: $(chars=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890; for i in {1..20}; do echo -n "${chars:RANDOM%${#chars}:1}"; done; echo)/" | oc apply -f -

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score8.68.6N/A
Attack VectorNetworkNetworkN/A
Attack ComplexityLowLowN/A
Privileges RequiredNoneNoneN/A
User InteractionNoneNoneN/A
ScopeUnchangedUnchangedN/A
ConfidentialityLowLowN/A
Integrity ImpactLowLowN/A
Availability ImpactHighHighN/A

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H

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

Red Hat CVSS v3 Score Explanation

Confidentiality and Integrity have both been rated as Low. This is due to the following factors: - Only some information is divulged, Istio and pod configurations are still hidden. - A potential attacker cannot modify all Istio configuration, only traffic flows, pod weighting etc.

Understanding the Weakness (CWE)

Access Control

Technical Impact: Bypass Protection Mechanism; Gain Privileges or Assume Identity; Read Application Data

If hard-coded cryptographic keys are used, it is almost certain that malicious users will gain access through the account in question. The use of a hard-coded cryptographic key significantly increases the possibility that encrypted data may be recovered.

Acknowledgements

Red Hat would like to thank Dagan Henderson (Akoya, LLC) for reporting this issue.

Frequently Asked Questions

Want to get errata notifications? Sign up here.