# CVE-2026-79704: Apache bRPC: Out-of-bounds Read in Multi-stream RPC Response Handling


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** No
- **Published:** 21 Oct 2026
- **Updated:** 21 Oct 2026
- **Also known as:** GHSA-xp33-gmw5-5ggc

## What is CVE-2026-79704?

CVE-2026-79704 is a vulnerability in Apache bRPC, published on 21 Oct 2026. 

### Official description

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 extra_stream_id 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 extra_stream_ids 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) extra_stream_ids, where N is the number of locally created streams. In Controller::HandleStreamConnection, the response path reads extra_stream_ids[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 extra_stream_ids 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.

Weakness: CWE-125 (Out-of-bounds Read)

## Which versions are affected by CVE-2026-79704?


## How do I fix CVE-2026-79704?

No fix has been published for CVE-2026-79704 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-79704 being exploited?

There is no known exploitation of CVE-2026-79704 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-79704 and fix it if it is affected.

What it is: CVE-2026-79704 is a vulnerability in Apache bRPC, published on 21 Oct 2026. 
Exploitation: There is no known exploitation of CVE-2026-79704 in the wild and no public exploit code.

Affected product: Apache bRPC. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-79704/ (Markdown: https://insights.sbomify.com/CVE-2026-79704/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-79704
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-79704
- OSV: https://osv.dev/vulnerability/CVE-2026-79704

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-79704/
Summaries are generated and may contain mistakes; the official description above is the record.
