Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-78066 Overview
CVE-2026-78066 is a resource exhaustion vulnerability in Apache bRPC versions prior to 1.18.0. Multiple parsers that accept wire-controlled input fail to bound the sizes declared by clients or the output produced by decompression. Attackers can send small, cap-compliant messages that force the server to allocate disproportionate amounts of memory, crashing the process. The flaw is classified under CWE-770: Allocation of Resources Without Limits or Throttling. Any bRPC service that accepts gzip, zlib, or snappy-compressed bodies, or RTMP, sofa-pbrpc, or mcpack2pb messages from untrusted clients is exposed.
Critical Impact
A remote unauthenticated attacker can crash bRPC server processes by submitting messages that trigger unbounded memory allocation, resulting in denial of service.
Affected Products
- Apache bRPC versions prior to 1.18.0
- bRPC services exposing gzip, zlib, or snappy decompression endpoints
- bRPC services exposing RTMP, sofa-pbrpc, or mcpack2pb protocol handlers
Discovery Timeline
- 2026-10-21 - CVE-2026-78066 published to the National Vulnerability Database
- 2026-10-22 - CVE-2026-78066 last updated in NVD
Technical Details for CVE-2026-78066
Vulnerability Analysis
CVE-2026-78066 covers five distinct parser flaws in Apache bRPC, each permitting attacker-controlled memory allocation. The common pattern is that wire-declared sizes are trusted and used to drive buffer allocation or decompression without validation against a server-side upper bound. The -max_body_size flag, which operators often assume provides a safety ceiling, is applied only to compressed bytes on the wire. Decompressed output size, protocol-specific message lengths, and declared container counts remain unbounded. The result is deterministic process termination with low attacker cost.
Root Cause
Five independent defects contribute to the vulnerability. The gzip, zlib, and snappy decompressors enforce no limit on decompressed output, allowing a 64 MiB cap-compliant body to inflate to tens of gigabytes. The Action Message Format (AMF) string readers allocate memory for the declared length before verifying that the bytes are actually available on the wire. RTMP chunk headers may re-declare a message length mid-stream, and the partial reassembly buffer grows without bound. The sofa-pbrpc parser does not bound meta_size. The mcpack2pb parser trusts wire-declared item counts when calling Reserve(), and a string value_size of zero underflows the buffer size calculation, aborting the process.
Attack Vector
An unauthenticated remote attacker establishes a connection to a vulnerable bRPC endpoint and submits a crafted payload. For the decompression path, the attacker sends a highly compressible blob (such as a long run of zero bytes) under a supported encoding. The server honors the compressed-byte cap, decompresses the payload, and exhausts available memory. For the RTMP, AMF, sofa-pbrpc, and mcpack2pb paths, the attacker sets large declared length or count fields in the protocol headers, forcing the server to pre-allocate or grow buffers until the process is killed by the operating system or aborts internally. No authentication or user interaction is required. Technical details are available in the Apache mailing list disclosure and the upstream fix in pull request 3476.
Detection Methods for CVE-2026-78066
Indicators of Compromise
- Sudden bRPC worker process terminations or SIGABRT events on hosts exposing gzip, zlib, snappy, RTMP, sofa-pbrpc, or mcpack2pb endpoints.
- Rapid resident memory growth in bRPC server processes following small inbound requests, visible in process accounting or cgroup memory statistics.
- Out-of-memory kills recorded in dmesg or systemd journal correlated with inbound traffic on bRPC listener ports.
Detection Strategies
- Inspect network telemetry for compressed request bodies with extreme compression ratios, particularly payloads near the -max_body_size ceiling that originate from untrusted sources.
- Alert on RTMP sessions where chunk headers re-declare message length values that exceed historical baselines for the service.
- Monitor for repeated client reconnects after bRPC process crashes, which can indicate scripted exploitation attempts.
Monitoring Recommendations
- Capture per-process memory high-water marks for bRPC services and alert when a single request correlates with multi-gigabyte allocation.
- Forward bRPC application logs and host-level OOM events into a centralized analytics pipeline for correlation across the fleet.
- Track bRPC version inventory continuously to confirm all instances have been upgraded to 1.18.0 or later.
How to Mitigate CVE-2026-78066
Immediate Actions Required
- Upgrade Apache bRPC to version 1.18.0 on all affected hosts as the primary remediation.
- If immediate upgrade is not possible, apply the upstream patch from apache/brpc pull request 3476 and rebuild.
- Restrict network exposure of bRPC services that accept gzip, zlib, snappy, RTMP, sofa-pbrpc, or mcpack2pb messages to trusted clients only.
Patch Information
Apache bRPC 1.18.0 introduces explicit limits on decompressed body size, RTMP message length, and mcpack2pb declared counts. Requests that exceed the new limits are rejected. Operators requiring larger legitimate values can raise the -max_decompressed_body_size and -max_body_size flags. The fix is tracked in the Apache mailing list advisory.
Workarounds
- Place bRPC services behind a reverse proxy or API gateway that enforces strict request size limits and rejects anomalous compression ratios.
- Disable gzip, zlib, snappy, RTMP, sofa-pbrpc, or mcpack2pb protocol handlers that are not required by the application configuration.
- Enforce cgroup or systemd memory limits on bRPC processes so that resource exhaustion is contained to a single worker rather than impacting the host.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

