Skip to content

Incorrect handling of HTTP requests and responses with mixed case schemes in Envoy

High
phlax published GHSA-pvgm-7jpg-pw5g Jul 25, 2023

Package

Envoy

Affected versions

< 1.27.0

Patched versions

1.26.4, 1.25.9, 1.24.10, 1.23.12

Description

Summary

Envoy allows mixed-case schemes in HTTP/2, however, some internal scheme checks in Envoy are case-sensitive, leading to incorrect handling of requests and responses with mixed case schemes.

Affected component(s)

HTTP and some related HTTP filters, like http/cache, OAuth2, and ssl redirect checks.

Details

Envoy allows mixed-case schemes in HTTP/2, however, some internal scheme checks are case-sensitive, which can lead to the rejection of requests with mixed-case schemes such as htTp or htTps, or the bypassing of some requests such as https in unencrypted connections.

With this fix, Envoy will now lowercase scheme values by default, and change the internal scheme checks that were case-sensitive to be case-insensitive.

Attack vector(s)

A HTTP request with mixed case scheme

PoC

For example, if a request with mixed scheme htTp is sent to the OAuth2 filter, it will fail the exact-match checks for http, and inform the remote endpoint the scheme is https, thus potentially bypassing OAuth2 checks specific to HTTP requests.

Impact

Bypass some requests with mixed schemes.

Mitigation

None

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

CVE ID

CVE-2023-35944

Weaknesses

Credits