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

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

CVE ID

CVE-2023-27487

Weaknesses

Credits