Improper Restriction of Operations within the Bounds of a Memory Buffer Affecting envoyproxy/envoy package, versions [,1.28.7) [1.29.0,1.29.9) [1.30.0,1.30.6) [1.31.0,1.31.2)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.05% (19th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-UNMANAGED-ENVOYPROXYENVOY-8062345
  • published 20 Sep 2024
  • disclosed 20 Sep 2024
  • credit Nick Van Dyck

How to fix?

Upgrade envoyproxy/envoy to version 1.28.7, 1.29.9, 1.30.6, 1.31.2 or higher.

Overview

Affected versions of this package are vulnerable to Improper Restriction of Operations within the Bounds of a Memory Buffer due to the handling of sendLocalReply in the HTTP async client. An attacker can cause the application to crash by exploiting the improper handling of HTTP status codes and the destruction sequence of the async stream.

Note:

This is only exploitable if the upgrade and connection headers are allowed, and request mirroring is configured.

PoC

  1. config allowed_headers to match any headers or
patterns:
- exact: upgrade
- exact: connection
  1. Send WebSocket upgrade requests

  2. The authentication server sends back 400 to reject the auth request.

  3. Then Envoy will crash

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
7.1 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    None
  • Privileges Required (PR)
    Low
  • User Interaction (UI)
    None
  • Confidentiality (VC)
    None
  • Integrity (VI)
    None
  • Availability (VA)
    High
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None