Skip to content

Crash when a redirect url without a state param is received in the oauth filter

Moderate
phlax published GHSA-j79q-2g66-2xv5 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

Denial of service (crash).

Affected components

Oauth2

Attack vector/s

If Envoy is running with the OAuth filter enabled exposed, a malicious actor could construct a request which would cause denial of service by crashing Envoy.

Description

The OAuth filter assumes that a state query param is present on any response that looks like an OAuth redirect response. Sending it a request with the URI path equivalent to the redirect path, without the state parameter, will lead to abnormal termination of Envoy process.

Example exploit or proof-of-concept

If the redirect path looks like /oauth_redirect, sending a request to Envoy with the URI path /oauth_redirect and without specifying the state param will lead to a segmentation fault.

Mitigation

The issue can be mitigated by locking down OAuth traffic, disabling the filter or by filtering traffic before it reaches the OAuth filter (e.g. via a lua script).

Severity

Moderate
6.5
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

CVE ID

CVE-2023-27496

Weaknesses

Credits