Skip to main content
Vulnerability Database/CVE-2026-74757

CVE-2026-74757: Apache bRPC DOS Vulnerability

CVE-2026-74757 is a denial of service vulnerability in Apache bRPC that allows attackers to force excessive memory allocation through crafted mcpack requests. This article covers technical details, affected versions, and mitigation steps.

Published:

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-74757 Overview

CVE-2026-74757 is an uncontrolled resource allocation vulnerability [CWE-770] in the mcpack2pb component of Apache bRPC versions prior to 1.18.0. Remote attackers can send a crafted mcpack request with an inflated array item count to force the server to preallocate large amounts of memory. A single request declaring item_count = 0x7fffffff can trigger approximately 16GB of virtual memory allocation. On memory-constrained hosts, this aborts the process with SIGABRT, producing a denial-of-service condition. The request body is parsed before authentication, so no credentials are required to exploit the flaw.

Critical Impact

An unauthenticated attacker can crash bRPC servers using the Baidu ubrpc deployment pattern by sending a single malformed mcpack packet.

Affected Products

  • Apache bRPC versions prior to 1.18.0
  • bRPC servers wiring NsheadService to UbrpcMcpack2Adaptor
  • Services parsing requests with code generated by the mcpack2pb protoc plugin

Discovery Timeline

  • 2026-10-21 - CVE-2026-74757 published to NVD
  • 2026-10-22 - Last updated in NVD database

Technical Details for CVE-2026-74757

Vulnerability Analysis

The vulnerability resides in the mcpack2pb parser used by Apache bRPC to decode mcpack-encoded requests into protobuf messages. The parser reads an array item count from the mcpack array header and passes that value directly to a Reserve() call on the corresponding repeated protobuf field. Because the item count is attacker-controlled and never cross-checked against the actual payload length, the server attempts to preallocate memory sized for the declared count regardless of how little data follows.

A request declaring item_count = 0x7fffffff causes the server to reserve roughly 16GB of virtual memory for a single field. On hosts with constrained memory or strict overcommit policies, the allocation fails and the process aborts with SIGABRT. The attack applies to bRPC deployments that wire a NsheadService to UbrpcMcpack2Adaptor, the standard Baidu ubrpc deployment pattern.

Root Cause

The mcpack2pb parser trusts the array header's declared item count without validating it against the remaining bytes of the array payload. Code generated by the mcpack2pb protoc plugin uses this unchecked value to size memory allocations for repeated protobuf fields.

Attack Vector

Exploitation requires network access to an affected bRPC endpoint. The attacker crafts an mcpack request containing an array header with an oversized item_count field and sends it to the target service. Because mcpack parsing occurs before authentication, no credentials or prior access are required. Technical discussion is available on the Apache Mailing List.

Detection Methods for CVE-2026-74757

Indicators of Compromise

  • Sudden process termination of bRPC services with SIGABRT and no preceding application errors
  • Spikes in virtual memory allocation on hosts running NsheadService with UbrpcMcpack2Adaptor
  • Inbound mcpack requests whose declared array item_count is disproportionate to the request body size

Detection Strategies

  • Deploy a parser or network inspection rule that flags mcpack messages where the array item_count exceeds the remaining byte length of the request
  • Monitor bRPC service crash logs and core dumps for repeated SIGABRT terminations originating in mcpack2pb parsing paths
  • Correlate OOM-kill events and malloc failures with recent inbound traffic to UbrpcMcpack2Adaptor endpoints

Monitoring Recommendations

  • Track per-process virtual memory growth rates on bRPC hosts and alert on sudden multi-gigabyte jumps
  • Capture packet metadata for traffic to Nshead/ubrpc listener ports to support post-incident analysis
  • Enable structured logging of request sizes and parser exceptions to surface anomalous mcpack payloads

How to Mitigate CVE-2026-74757

Immediate Actions Required

  • Upgrade Apache bRPC to version 1.18.0 on all affected servers
  • Inventory services that wire NsheadService to UbrpcMcpack2Adaptor and prioritize them for patching
  • Restrict network exposure of bRPC endpoints to trusted clients until the upgrade is complete

Patch Information

Apache bRPC 1.18.0 resolves the issue by capping the array item count to the remaining bytes of the array payload. Operators who cannot upgrade immediately can apply the fix via Apache bRPC Pull Request #3451. Both options enforce the same bounds check in the mcpack2pb parser.

Workarounds

  • Place a reverse proxy or network filter in front of bRPC services to drop mcpack messages exceeding a reasonable size
  • Enforce strict per-process memory limits (ulimit -v or cgroup memory.max) so oversized allocations fail predictably without destabilizing the host
  • Where feasible, migrate affected services away from the UbrpcMcpack2Adaptor request path until patching is complete
bash
# Example cgroup v2 memory cap for a bRPC service unit
systemctl set-property brpc-service.service MemoryMax=4G
systemctl restart brpc-service.service

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.