Skip to content

CORS filter segfault when origin header is removed

Moderate
phlax published GHSA-mc6h-6j9x-v3gq 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

CORS filter will segfault and crash Envoy when the origin header is removed and deleted between decodeHeadersand encodeHeaders.

Affected components

HTTP CORS filter

Details

In the CORS filter's decodeHeaders method, a pointer to the origin header is captured. If the origin header is configured to be removed, a segfault crash will occur when the pointer is used again in encodeHeaders since it has been dereferenced.

PoC

Impact

There will be a segfault crash in the CORS filter

Mitigation

Not removing the origin header in Envoy configuration

Detection

Crashes in CORS filter.

Severity

Moderate

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
Low
User interaction
Required
Scope
Unchanged
Confidentiality
Low
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:L/UI:R/S:U/C:L/I:N/A:H

CVE ID

CVE-2023-35943

Weaknesses

Credits