Skip to content

Client may fake the header `x-envoy-original-path`

High
phlax published GHSA-5375-pq35-hf2g Apr 4, 2023

Package

Envoy (Envoy)

Affected versions

< 1.26.0

Patched versions

1.25.3, 1.24.4, 1.23.6, 1.22.9

Description

Impact

Bypass JWT checks, forge fake original paths.

Affected components

Trace logs, gRPC logs, JWT filter.

Attack vector/s

The header x-envoy-original-path should be an internal header, but Envoy does not remove this header from the request at the beginning of request processing when it is sent from an untrusted client.

The faked header would then be used for trace logs and grpc logs, as well as used in the URL used for jwt_authn checks if the jwt_authn filter is used, and any other upstream use of the x-envoy-original-path header.

Description

Trusted x-envoy-original-path header can be forged by attackers

Example exploit or proof-of-concept

Client request:

$ curl -H "x-envoy-original-path: /fake" http://localhost:8080/real-path/

Access log, using the default log format:

[2023-02-28T19:26:53.660Z] "GET /fake HTTP/1.1" 200 - 0 3257 1 0 "-" "curl/7.82.0" "36174006-b793-4e40-8a38-a3d17a2a37a0" "localhost:8080" "172.18.98.50:8020"

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.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

CVE ID

CVE-2023-27487

Weaknesses

Credits