CVE-2021-39155:Istio authorization policy bypass vulnerability due to case-sensitive hostname comparison

splash
Back

Description Preview

A vulnerability in Istio allows attackers to bypass authorization policies by manipulating the case of hostnames in HTTP Host headers. While Istio routes requests in a case-insensitive manner according to RFC 4343, its authorization policy enforcement incorrectly performs case-sensitive comparisons, creating a security gap that allows policy evasion.

Overview

CVE-2021-39155 affects Istio's authorization policy enforcement mechanism. The vulnerability stems from Istio performing case-sensitive comparisons of hostnames in HTTP Host headers during authorization checks, despite RFC 4343 specifying that hostnames should be compared case-insensitively. Since Istio's proxy routes requests in a case-insensitive way but enforces authorization policies based on case-sensitive comparisons, attackers can bypass security restrictions by simply changing the case of characters in the hostname. For example, if an authorization policy blocks requests to "httpbin.foo" from certain source IPs, an attacker could bypass this restriction by sending requests to "Httpbin.Foo" instead.

Remediation

Users should upgrade to one of the following patched versions:

  • Istio 1.11.1
  • Istio 1.10.4
  • Istio 1.9.8

If immediate upgrading is not possible, a workaround is available: implement a Lua filter to normalize the Host header before the authorization check occurs. This approach is similar to the path normalization technique described in Istio's Security Best Practices guide. The filter should convert all hostnames to a consistent case (typically lowercase) before authorization policies are applied.

References

  1. RFC 4343: Domain Name System (DNS) Case Insensitivity Clarification - https://datatracker.ietf.org/doc/html/rfc4343
  2. GitHub Security Advisory GHSA-7774-7vr3-cc8j - https://github.com/istio/istio/security/advisories/GHSA-7774-7vr3-cc8j
  3. Istio Security Best Practices Guide - https://istio.io/latest/docs/ops/best-practices/security/#case-normalization

Industry ExposureMost to least
This section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.

  1. Management of Companies & Enterprises
    Management of Companies & Enterprises
  2. Other Services (except Public Administration)
    Other Services (except Public Administration)
  3. Accommodation & Food Services
    Accommodation & Food Services
  4. Administrative, Support, Waste Management & Remediation Services
    Administrative, Support, Waste Management & Remediation Services
  5. Agriculture, Forestry Fishing & Hunting
    Agriculture, Forestry Fishing & Hunting
  6. Arts, Entertainment & Recreation
    Arts, Entertainment & Recreation
  7. Construction
    Construction
  8. Educational Services
    Educational Services
  9. Finance and Insurance
    Finance and Insurance
  10. Health Care & Social Assistance
    Health Care & Social Assistance
  11. Information
    Information
  12. Manufacturing
    Manufacturing
  13. Mining
    Mining
  14. Professional, Scientific, & Technical Services
    Professional, Scientific, & Technical Services
  15. Public Administration
    Public Administration
  16. Real Estate Rental & Leasing
    Real Estate Rental & Leasing
  17. Retail Trade
    Retail Trade
  18. Transportation & Warehousing
    Transportation & Warehousing
  19. Utilities
    Utilities
  20. Wholesale Trade
    Wholesale Trade

Focus on What Matters

  1. See Everything.
  2. Identify True Risk.
  3. Proactively Mitigate Threats.

Let's talk!

background