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-87849 Overview
CVE-2026-87849 is an out-of-bounds read vulnerability [CWE-125] in the Discovery naming-service reply parser of Apache bRPC versions prior to 1.18.0. The parser calls RapidJSON object-only accessors such as FindMember on JSON values without first validating that those values are objects. A malformed Discovery response whose data, service, or instances members contain non-object entries triggers undefined behavior in RapidJSON. The result is an out-of-bounds memory read that commonly crashes the bRPC client process when it refreshes its server list.
Critical Impact
A compromised or misconfigured Discovery backend can crash any bRPC client that polls it, enabling denial-of-service against distributed services built on Apache bRPC.
Affected Products
- Apache bRPC versions prior to 1.18.0
- Applications using DiscoveryNamingService for service discovery
- bRPC clients consuming /discovery/nodes or /discovery/fetchs responses
Discovery Timeline
- 2026-10-21 - CVE-2026-87849 published to NVD
- 2026-10-22 - Last updated in NVD database
Technical Details for CVE-2026-87849
Vulnerability Analysis
The flaw resides in src/brpc/policy/discovery_naming_service.cpp. Two functions, DiscoveryNamingService::GetServers() and DiscoveryNames::ListDiscoveryNodes(), parse JSON replies returned by a Discovery backend. Both functions invoke RapidJSON object member accessors on JSON values without first confirming the value is an object.
RapidJSON defines FindMember and related accessors only for values of object type. Calling these accessors on a non-object value violates the class invariant and produces undefined behavior. In practice, the library reads memory outside the bounds of the value's internal representation, which typically crashes the hosting process.
The parser trusts the structure of the Discovery reply. When any element in data, service, or the instances array is a bare integer, string, or array rather than an object, the client enters this undefined state during its next server-list refresh.
Root Cause
The root cause is missing type validation before invoking type-specific accessors. The parser assumes well-formed Discovery responses and omits IsObject() checks prior to calling FindMember. This is a classic input validation gap combined with a precondition violation in a third-party library.
Attack Vector
Exploitation requires an attacker to control or influence the Discovery backend that a bRPC client queries. A hostile or compromised Discovery service returns a crafted /discovery/nodes or /discovery/fetchs response containing non-object entries. On the next refresh cycle, every connected bRPC client processes the malformed payload and crashes. The attack produces denial-of-service without requiring authentication to the client itself. Technical details are available in the Apache bRPC Pull Request #3533 and the Apache Mailing List Discussion.
Detection Methods for CVE-2026-87849
Indicators of Compromise
- Unexpected crashes or segmentation faults in bRPC client processes shortly after Discovery server-list refresh intervals.
- Core dumps with stack traces referencing DiscoveryNamingService::GetServers or RapidJSON FindMember.
- Repeated client restarts correlated with queries to /discovery/nodes or /discovery/fetchs endpoints.
Detection Strategies
- Inspect Discovery backend responses for non-object entries in data, service, and instances fields.
- Monitor bRPC client logs for parser warnings or abnormal termination events during naming-service updates.
- Audit the integrity and access controls of all Discovery backends feeding bRPC clients.
Monitoring Recommendations
- Track process restart counts and crash telemetry on hosts running bRPC-based services.
- Capture and inspect HTTP responses from Discovery endpoints at a network observability layer.
- Alert on deviations from the expected JSON schema of Discovery responses.
How to Mitigate CVE-2026-87849
Immediate Actions Required
- Upgrade Apache bRPC to version 1.18.0 or later across all affected clients.
- Restrict network access to Discovery backends to trusted operators and services only.
- Validate the integrity and authenticity of configured Discovery endpoints.
Patch Information
The fix is merged in Apache bRPC Pull Request #3533 and shipped in bRPC 1.18.0. The patch validates that Discovery response data, per-service data, and instance entries are JSON objects before calling member accessors. Non-object node and instance entries are skipped, and non-object data or service values are rejected.
Workarounds
- Place Discovery backends behind authenticated, mutually trusted channels to prevent response tampering.
- Deploy a reverse proxy that validates Discovery response schemas before forwarding them to bRPC clients.
- Pin bRPC clients to known-good Discovery infrastructure and disable dynamic reconfiguration of discovery URLs.
# Verify installed bRPC version and upgrade
git -C brpc describe --tags
git -C brpc fetch --tags
git -C brpc checkout 1.18.0
cmake -B build -S brpc && cmake --build build
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

