Envoy, a cloud-native high-performance proxy, has a vulnerability related to decompression attacks in its versions prior to 1.22.1. The vulnerability allows an attacker to leverage zip bombs and cause denial of service. Users should upgrade to version 1.22.1 or, if unable to do so, consider disabling decompression.

Introduction

Envoy is a widely-used open-source edge and service proxy designed for cloud-native applications. Envoy is especially popular in microservice architectures, where its high performance, resiliency and programmability help to manage sophisticated network topologies and traffic patterns. However, users need to be aware of the recently discovered vulnerability in versions prior to 1.22.1, identified as CVE-2022-29225, which affects decompression handling and may expose systems to denial of service attacks.

Envoy Vulnerability Details (CVE-2022-29225)

In versions prior to 1.22.1, Envoy secompressors accumulate decompressed data into an intermediate buffer before overwriting the body in the decode/encodeBody process. This behavior may allow an attacker to zip bomb the secompressor by sending a small, highly compressed payload. Maliciously constructed zip files may exhaust the system's memory, consequently leading to a denial of service.

Here's a simplified code snippet that demonstrates how the decompression attack might occur

def decompress_payload(payload):
    intermediate_buffer = b""
    
    # Simulating decompression of a malicious zip bomb payload
    for data in payload:
        decompressed_data = decompress(data)
        intermediate_buffer += decompressed_data
    return intermediate_buffer

def process_request(request):
    decoded_body = decompress_payload(request.encoded_body)
    request.body = decoded_body

Mitigation Steps

To protect against the CVE-2022-29225 vulnerability, users are advised to upgrade to Envoy version 1.22.1, which contains necessary security patches. The upgrade procedure can be found in the official Envoy documentation: https://www.envoyproxy.io/docs/envoy/latest/start/install

For users unable to upgrade immediately, consider disabling decompression as a temporary measure. Disabling decompression can be done by altering the configuration as outlined in Envoy's documentation: https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/decompressor_filter#config-http-filters-decompressor

Conclusion

CVE-2022-29225 is a significant vulnerability affecting Envoy versions prior to 1.22.1, which may expose systems to denial of service attacks through decompression abuse. It is essential for users to be aware of this issue and take appropriate steps to secure their Envoy deployments. Immediate upgrading to version 1.22.1 is recommended, but users unable to upgrade should consider disabling decompression temporarily. Remaining vigilant and proactive in addressing security concerns is crucial to protecting cloud-native applications and the valuable data they process.

Timeline

Published on: 06/09/2022 20:15:00 UTC
Last modified on: 06/16/2022 17:30:00 UTC