CVE-2021-39155: Istio.io/istio Authorization Policy Bypass Due To Vulnerability

HIGH
Advisory Identifier: GHSA-7774-7vr3-cc8j
CVSS 8.3
CWE-178
Published
Advisory Summary

CVE-2021-39155 is a HIGH (CVSS 8.3) authorization policy bypass due to vulnerability (CWE-178: Improper Handling of Case Sensitivity) affecting Istio.io/istio libraries in the Go ecosystem. The issue involves authorization policy bypass due to case insensitive host comparison. Remediation is available by upgrading affected packages to version 1.9.8, 1.10.4, 1.11.1.

CVE-2021-39155 at a Glance

CVE Identifier CVE-2021-39155
GHSA Identifier GHSA-7774-7vr3-cc8j
Severity HIGH
CVSS v3.1 Base Score 8.3
CWE Classification CWE-178: Improper Handling of Case Sensitivity
Affected Product Istio.io/istio
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2021-39155

To remediate this vulnerability, upgrade all affected Istio.io/istio dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

istio.io/istio fixed: 1.9.8
Upgrade istio.io/istio to 1.9.8
istio.io/istio fixed: 1.10.4
Upgrade istio.io/istio to 1.10.4
istio.io/istio fixed: 1.11.1
Upgrade istio.io/istio to 1.11.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for istio.io/istio

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-39155, inspect your project dependencies for Istio.io/istio:

inspect dependencies for istio.io/istio

Analyze the terminal output to locate any version of Istio.io/istio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.8), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-178: Improper Handling of Case Sensitivity, where the product does not properly account for differences in case sensitivity when accessing or determining the properties of a resource, leading to inconsistent results. In Istio.io/istio, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact According to [RFC 4343](https://datatracker.ietf.org/doc/html/rfc4343), 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 Envoy 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 * Istio 1.11.1 and above * Istio 1.10.4 and above * Istio 1.9.8 and above ### Workarounds 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](https://istio.io/latest/docs/ops/best-practices/security/#case-normalization) guide. ### References More details can be found in the [Istio Security Bulletin](https://istio.io/latest/news/security/istio-security-2021-008). ### For more information If you have any questions or comments about this advisory, please email us at istio-security-vulnerability-reports@googlegroups.com

CVE-2021-39155 Affected Istio.io/istio Versions

3 component(s)
Fixed Versions:
1.9.81.10.41.11.1
Product / Package Ecosystem Affected Versions Fixed Version
istio.io/istio
Go
< 1.9.8
1.9.8
istio.io/istio
Go
≥ 1.10.0
< 1.10.4
1.10.4
istio.io/istio
Go
≥ 1.11.0
< 1.11.1
All 1 versions
1.11.0
1.11.1

References

Frequently Asked Questions

What is CVE-2021-39155?
CVE-2021-39155 is a security vulnerability in Istio.io/istio involving Authorization Policy Bypass Due to Case Insensitive Host Comparison under CWE-178: Improper Handling of Case Sensitivity.
Which Istio.io/istio versions are affected?
Affected versions include releases prior to 1.9.8, 1.10.4, 1.11.1 across affected packages: istio.io/istio.
What version fixes CVE-2021-39155?
Upgrading to 1.9.8, 1.10.4, 1.11.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is istio.io/istio affected?
Yes, istio.io/istio is affected in releases prior to 1.9.8, 1.10.4, 1.11.1. Upgrade your dependency to 1.9.8, 1.10.4, 1.11.1 or later.
What is the CVSS score of CVE-2021-39155?
CVE-2021-39155 has a CVSS v3.1 base score of 8.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L.
What CWE is associated with CVE-2021-39155?
CVE-2021-39155 is classified under CWE-178: Improper Handling of Case Sensitivity (The product does not properly account for differences in case sensitivity when accessing or determining the properties of a resource, leading to inconsistent results.).
How can I check Go dependencies for CVE-2021-39155?
Run the dependency tree command: 'inspect dependencies for istio.io/istio'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7774-7vr3-cc8j",
  "modified" : "2021-12-13T13:09:54Z",
  "published" : "2021-08-30T16:15:56Z",
  "aliases" : [ "CVE-2021-39155" ],
  "summary" : "Authorization Policy Bypass Due to Case Insensitive Host Comparison",
  "details" : "### Impact\nAccording to [RFC 4343](https://datatracker.ietf.org/doc/html/rfc4343), 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 Envoy proxy will route the request hostname in a case-insensitive way which means the authorization policy could be bypassed.\n \nAs 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\".\n\n### Patches\n* Istio 1.11.1 and above\n* Istio 1.10.4 and above\n* Istio 1.9.8 and above\n\n### Workarounds\nA 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](https://istio.io/latest/docs/ops/best-practices/security/#case-normalization) guide.\n\n### References\nMore details can be found in the [Istio Security Bulletin](https://istio.io/latest/news/security/istio-security-2021-008).\n\n### For more information\nIf you have any questions or comments about this advisory, please email us at istio-security-vulnerability-reports@googlegroups.com\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "istio.io/istio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.9.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "istio.io/istio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.10.0"
      }, {
        "fixed" : "1.10.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "istio.io/istio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.11.0"
      }, {
        "fixed" : "1.11.1"
      } ]
    } ],
    "versions" : [ "1.11.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/istio/istio/security/advisories/GHSA-7774-7vr3-cc8j"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-39155"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/istio/istio/commit/084b417a486dbe9b9024d4812877016a484572b1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/istio/istio/commit/76ed51413ddd2a7fa253a368ab20a9cec5fb1cbe"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/istio/istio/commit/90b00bdf891e6c770cb3235c14a9b1fda96cc7c5"
  }, {
    "type" : "WEB",
    "url" : "https://datatracker.ietf.org/doc/html/rfc4343"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/istio/istio"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-178" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-08-25T22:29:16Z",
    "nvd_published_at" : "2021-08-24T23:15:00Z"
  }
}