CVE-2021-39155: Authorization Policy Bypass Due to Case Insensitive Host Comparison
Istio is an open source platform for providing a uniform way to integrate microservices, manage traffic flow across microservices, enforce policies and aggregate telemetry data. According to RFC 4343, Istio authorization policy should compare the hostname in the HTTP Host header in a case insensitive way, but currently the comparison is case sensitive. The proxy will route the request hostname in a case-insensitive way which means the authorization policy could be bypassed. As an example, the user may have an authorization policy that rejects request with hostname "httpbin.foo" for some source IPs, but the attacker can bypass this by sending the request with hostname "Httpbin.Foo". Patches are available in Istio 1.11.1, Istio 1.10.4 and Istio 1.9.8. As a work around a Lua filter may be written to normalize Host header before the authorization check. This is similar to the Path normalization presented in the Security Best Practices guide.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Istioto a version that resolves this vulnerability.Fixed in 1.11.1 - Upgrade
Upgrade
Istioto a version that resolves this vulnerability.Fixed in 1.10.4 - Upgrade
Upgrade
Istioto a version that resolves this vulnerability.Fixed in 1.9.8 - Configuration
Implement a Lua filter that normalizes the HTTP Host header (e.g., convert it to lowercase) before Istio authorization policy performs the hostname comparison, to prevent bypass using different Host header casing (e.g., "Httpbin.Foo" vs "httpbin.foo").
Istio (Envoy) Lua filter workaround Normalize HTTP Host header before authorization check (case-insensitive match) = Lowercase the Host header value
Event History
Frequently Asked Questions
What is CVE-2021-39155?
CVE-2021-39155 is a vulnerability in Istio, an open source platform for integrating microservices, that allows unauthorized users to bypass authorization policies.
How does CVE-2021-39155 affect Istio?
CVE-2021-39155 affects Istio versions 1.9.8, 1.10.0 to 1.10.4, and 1.11.0 to 1.11.1 on Microsoft Windows Server 2022.
What is the severity of CVE-2021-39155?
CVE-2021-39155 has a severity rating of 7.5 (High).
What is the CWE ID of CVE-2021-39155?
CVE-2021-39155 has a CWE ID of 178.
How can I fix CVE-2021-39155?
To fix CVE-2021-39155, it is recommended to upgrade to a patched version of Istio.