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
8.2
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None
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