CVE-2026-79704: Apache bRPC: Out-of-bounds Read in Multi-stream RPC Response Handling
An out-of-bounds read vulnerability exists in the streaming RPC client of Apache bRPC (versions 1.11.0 through 1.17.0) on all platforms. A client that creates multiple streams in a single RPC expects the server response to carry exactly one extrastreamid for every additional stream. The response handling path indexed the returned identifiers using the locally created stream count without first validating the size of the returned list, so a malicious or compromised server (or an on-path attacker) can trigger an out-of-bounds read in the client by returning a malformed StreamSettings response with fewer extrastreamids than expected. This may crash the client process (denial of service) or leak unintended memory contents into subsequent stream handling; surplus identifiers have no valid client-stream mapping and are processed inconsistently.
Root Cause: Since bRPC 1.11.0, a client can create multiple streams in one RPC via batch StreamCreate. The expected behavior is that the server response must return exactly (N-1) extrastreamids, where N is the number of locally created streams. In Controller::HandleStreamConnection, the response path reads extrastreamids[i-1] for each additional local stream without first comparing the returned list size with (N-1). If the server returns fewer identifiers, the read runs past the end of the returned list (out-of-bounds read); if it returns more, the surplus identifiers have no corresponding client-side stream.
Affected Scenarios: A bRPC client using multi-stream RPC (creating more than one stream in a single RPC) that connects to an untrusted, malicious, or compromised server or to a server reached through an untrusted network path. The server sends a malformed StreamSettings response to trigger the issue.
How to Fix: (Choose one of the following options) 1. Upgrade bRPC to version 1.18.0, which fixes this issue. 2. Apply this patch: https://github.com/apache/brpc/pull/3485
Note: The fix makes the client reject responses whose extrastreamids count does not exactly match the number of additional client streams. Such mismatched responses now fail the RPC with ERESPONSE and go through the existing stream cleanup path, instead of being partially processed.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Apache bRPCto a version that resolves this vulnerability.Fixed in 1.18.0
Event History
Frequently Asked Questions
Which clients are exposed to this issue?
Apache bRPC client deployments on any platform are affected when using versions 1.11.0 through 1.17.0 and creating multiple streams in a single RPC through batch StreamCreate. Clients that do not use this multi-stream response-handling path are not described as exposed.
What must an attacker be able to do to trigger it?
An attacker needs to control or compromise the RPC server, or be positioned on path to alter the server response. They must return a malformed StreamSettings response containing fewer extra_stream_ids than the client expects.
What is the likely impact on an affected client?
The malformed response can cause an out-of-bounds read, potentially crashing the client process and causing denial of service. It may also leak unintended memory contents into later stream handling.
How can I determine whether my application is affected?
Check whether it uses Apache bRPC 1.11.0 through 1.17.0 and creates multiple streams in one RPC using batch StreamCreate. The vulnerable condition is a response with a number of extra_stream_ids other than the expected N-1 for N locally created streams.