CVE-2023-27492 in Envoyinfo

Summary

by MITRE • 04/04/2023

Envoy is an open source edge and service proxy designed for cloud-native applications. Prior to versions 1.26.0, 1.25.3, 1.24.4, 1.23.6, and 1.22.9, the Lua filter is vulnerable to denial of service. Attackers can send large request bodies for routes that have Lua filter enabled and trigger crashes. As of versions versions 1.26.0, 1.25.3, 1.24.4, 1.23.6, and 1.22.9, Envoy no longer invokes the Lua coroutine if the filter has been reset. As a workaround for those whose Lua filter is buffering all requests/ responses, mitigate by using the buffer filter to avoid triggering the local reply in the Lua filter.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 04/22/2023

The vulnerability CVE-2023-27492 affects Envoy proxy versions prior to 1.26.0, 1.25.3, 1.24.4, 1.23.6, and 1.22.9, specifically targeting the Lua filter component that enables dynamic scripting capabilities within the proxy. This issue represents a denial of service vulnerability classified under CWE-400, where attackers can exploit the proxy's handling of large request bodies to trigger system crashes. The vulnerability manifests when requests are processed through routes that have Lua filters enabled, creating a condition where the proxy's internal state becomes corrupted due to improper handling of request data flow.

The technical flaw lies in the improper management of Lua coroutines within the filter chain, where the proxy continues to invoke Lua execution contexts even after the filter has been reset or terminated. This behavior creates a race condition scenario where memory management becomes inconsistent, leading to crashes when large payloads are processed through affected routes. The vulnerability operates at the application layer and can be classified under ATT&CK technique T1499.004, specifically targeting network infrastructure components through resource exhaustion and system instability. The issue is particularly concerning in cloud-native environments where Envoy serves as a critical edge proxy component, as it can disrupt service availability and create cascading failures across microservices architectures.

The operational impact of this vulnerability extends beyond simple service disruption, potentially affecting the entire service mesh ecosystem where Envoy operates as a fundamental building block. Organizations using affected versions may experience unexpected proxy crashes, leading to service degradation, increased latency, and potential data loss during request processing. The vulnerability is particularly dangerous in high-throughput environments where large payloads are common, such as file uploads, API gateway scenarios, or microservice communication patterns. Attackers can leverage this weakness to perform sustained denial of service attacks, systematically crashing proxy instances and rendering services unavailable to legitimate users.

Mitigation strategies for this vulnerability include upgrading to the patched versions mentioned in the advisory, which implement proper coroutine management by preventing Lua execution when filters have been reset. Organizations should also consider implementing the buffer filter workaround for deployments where upgrading is not immediately feasible, as this approach helps avoid triggering local replies within the Lua filter context. Additionally, implementing proper request size limiting and monitoring mechanisms can help detect and prevent exploitation attempts. Security teams should also conduct comprehensive testing of their proxy configurations to ensure that all routes utilizing Lua filters are properly secured, as this vulnerability can be exploited without authentication and requires minimal resources to execute successfully. The fix addresses the root cause by implementing proper state management and ensuring that Lua execution contexts are properly terminated when filter reset conditions occur, aligning with secure coding practices recommended in the OWASP Top Ten and NIST cybersecurity frameworks.

Responsible

GitHub, Inc.

Reservation

03/01/2023

Disclosure

04/04/2023

Moderation

accepted

CPE

ready

EPSS

0.00686

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!