CVE-2025-64763
Executive Summary
CVE-2025-64763 describes a desynchronization vulnerability in the Envoy proxy when operating in TCP proxy mode for CONNECT requests. The flaw allows a client to send data before receiving a 2xx response from the upstream proxy. If the upstream proxy later responds with a non-2xx status, the tunnel state becomes desynchronized, potentially leading to data leakage or request smuggling. The vulnerability has a low CVSS score of 3.7 due to the high complexity of exploitation and limited impact. No public proof-of-concept or exploit code is available, and the vendor has not released a patch, instead providing a runtime flag to reject early CONNECT data.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
Envoy is a high-performance proxy commonly used in service mesh architectures (e.g., Istio) and as an API gateway. This vulnerability affects the core proxy logic and is not specific to any package manager. However, organizations using Envoy in containerized environments should verify their image versions and consider the runtime flag as a temporary mitigation.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): High (H) – requires specific network conditions and upstream proxy behavior.
- Privileges Required (PR): None (N)
- User Interaction (UI): None (N)
- Scope (S): Unchanged (U)
- Confidentiality (C): None (N)
- Integrity (I): Low (L) – potential for data corruption or request smuggling.
- Availability (A): None (N)
- Base Score: 3.7 (Low)
Threat Level: Low. Exploitation requires a specific configuration (TCP proxy mode with CONNECT) and an upstream proxy that rejects the tunnel after receiving early data. The impact is limited to integrity issues.
Deep Dive & Mechanics
Envoy’s TCP proxy mode handles CONNECT requests by establishing a tunnel to an upstream proxy. Normally, the client sends a CONNECT request, the upstream responds with a 2xx, and then data flows bidirectionally. The vulnerability arises because Envoy accepts client data before the 2xx response and forwards it to the upstream. If the upstream later responds with a non-2xx (e.g., 407 Proxy Authentication Required), the tunnel state becomes desynchronized: the client believes the tunnel is established, but the upstream has rejected it. This can lead to:
- Request smuggling: The early data may be interpreted as a new request by the upstream.
- Data leakage: The upstream may send error responses that are misinterpreted by the client.
The root cause is the lack of validation of the upstream response before forwarding client data. The reject_early_connect_data runtime flag, when enabled, causes Envoy to buffer client data until a 2xx response is received, preventing the desynchronization.
Vulnerable vs. Patched Code
Vulnerable behavior (simplified):
# Pseudo-code for vulnerable Envoy CONNECT handling
def handle_connect(client_socket, upstream_socket):
# Forward CONNECT request
upstream_socket.send(client_socket.recv())
# Start forwarding client data immediately (vulnerable)
while True:
data = client_socket.recv()
if not data:
break
upstream_socket.send(data)
# Wait for upstream response
response = upstream_socket.recv()
if response.status_code != 200:
# Tunnel rejected, but data already sent
handle_error()
Patched behavior (with flag enabled):
# Pseudo-code for patched behavior
def handle_connect(client_socket, upstream_socket):
upstream_socket.send(client_socket.recv())
# Buffer client data until 2xx response
client_buffer = []
while True:
data = client_socket.recv()
if not data:
break
client_buffer.append(data)
response = upstream_socket.recv()
if response.status_code == 200:
for data in client_buffer:
upstream_socket.send(data)
else:
# Reject connection and discard buffered data
client_socket.close()
Exploitation & Lab Setup
Red Team
Prerequisites:
- Envoy configured in TCP proxy mode with CONNECT support.
- An upstream proxy that responds with a non-2xx status after receiving data (e.g., a proxy requiring authentication).
Exploitation Steps:
- Establish a TCP connection to Envoy.
- Send a CONNECT request to the upstream proxy.
- Immediately send data (e.g., HTTP request) before receiving any response.
- The upstream proxy, upon receiving the CONNECT request, responds with a 407 Proxy Authentication Required.
- Envoy forwards the 407 to the client, but the early data has already been sent to the upstream, causing desynchronization.
No public exploit code is available.
Blue Team
Detection:
- Monitor Envoy logs for CONNECT requests followed by non-2xx responses.
- Look for anomalies in the timing of data transmission (data sent before response).
Mitigation:
- Enable the runtime flag:
envoy.reloadable_features.reject_early_connect_data: true - Restrict CONNECT requests to trusted upstream proxies.
- Use network segmentation to limit exposure.
Indicators of Compromise (IOCs)
- Network: Unusual CONNECT requests with data payloads before receiving a response.
- Logs: Envoy logs showing
CONNECTfollowed by407or other non-2xx status codes. - Traffic: Multiple TCP streams with early data in CONNECT tunnels.
Detection Engineering
YARA Rule
rule CVE_2025_64763_Envoy_CONNECT_Desync {
meta:
description = "Detects Envoy CONNECT desynchronization attempts"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-64763"
strings:
$connect = "CONNECT" nocase
$http = "HTTP/" nocase
$early_data = { 48 54 54 50 2f } // "HTTP/" in hex
condition:
$connect at 0 and #http > 1
}
Sigma Rule
title: Envoy CONNECT Desynchronization Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential exploitation of CVE-2025-64763
author: Valters IT
logsource:
category: proxy
product: envoy
detection:
selection:
request.method: 'CONNECT'
response.status: '407'
condition: selection
falsepositives:
- Legitimate proxy authentication failures
level: medium
Suricata Rule
alert tcp any any -> any 80 (msg:"CVE-2025-64763 Envoy CONNECT Desync Attempt"; flow:to_server; content:"CONNECT"; nocase; content:"HTTP/"; within:100; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Enable the runtime flag
envoy.reloadable_features.reject_early_connect_data: truein Envoy configuration. - Short-term: Upgrade to a patched version when available (monitor Envoy releases).
- Long-term: Implement strict validation of CONNECT responses before forwarding client data.
- Network: Use firewalls to restrict CONNECT methods to authorized upstream proxies.
- Monitoring: Deploy detection rules (YARA, Sigma, Suricata) to identify exploitation attempts.
Valters IT
DevSecOps & Cyber Threat Intelligence