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
6.3
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
High
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