Skip to content

oauth filter calls continueDecoding() from within decodeHeaders()

High
mattklein123 published GHSA-rww6-8h7g-8jf6 Jun 9, 2022

Package

Envoy (Envoy)

Affected versions

< 1.22.1

Patched versions

1.22.1

Description

Attack type

Remote

Impact

Denial of Service (crash)

Affected component(s)

OAuth.

Attack vector(s)

Remote.

Discoverer(s)/Credits

Identified by Raul Gutierrez Segales rgs@pinterest.com while investigating GHSA-h45c-2f94-prxh, originally reported by Weiqiu Wen ff800u@gmail.com

References

See also GHSA-h45c-2f94-prxh

Description (brief; included in CVE)

The OAuth filter would try to invoke the remaining filters in the chain after emitting a local response, which triggers an ASSERT() in newer versions and corrupts memory on earlier versions.

Example exploit or proof-of-concept

The general authentication flow in the oauth filter triggers this condition, so should be exploitable.

Description (full; not included in CVE but will be published on GitHub later and linked)

continueDecoding() shouldn’t ever be called from filters after a local reply has been sent.

Mitigation

NA.

Detection

Crashes with possible unrelated stack traces after successful oauth flow metrics are emitted.

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
None
Integrity
None
Availability
High

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:N/I:N/A:H

CVE ID

CVE-2022-29228