Apache bRPC: Out-of-bounds read via non-object fields in Discovery naming-service reply parsing
The Discovery naming-service reply parser in Apache bRPC (versions < 1.18.0) calls RapidJSON object-only accessors (FindMember) on JSON values without first validating that those values are objects. A malformed Discovery response whose data/service members or instances list contain non-object entries (e.g. a bare integer) triggers the RapidJSON object-access precondition on the client, reading memory out of bounds and potentially crashing the bRPC client. Root Cause: In src/brpc/policy/discovery_naming_service.cpp, DiscoveryNamingService::GetServers() and DiscoveryNames::ListDiscoveryNodes() access JSON values with member functions on non-object values. RapidJSON only defines these operations for object types; invoking them on a non-object violates the class invariant and results in undefined behavior (out-of-bounds read), commonly crashing the process. Affected Scenarios: An operator-configured (or compromised) Discovery backend returns a malformed /discovery/nodes or /discovery/fetchs response whose data/service/instance entries are not JSON objects, crashing any bRPC client that refreshes its server list. How to Fix: 1. Upgrade bRPC to version 1.18.0 or later, which fixes this issue. 2. Apply this patch: https://github.com/apache/brpc/pull/3533 The fix validates that the Discovery response data, per-service data, and instance entries are JSON objects (and skips non-object node/instance entries and rejects non-object data/service values) before calling member accessors.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-87849
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 02:00 UTC · Revision 1
Source evidence
Apache bRPC: Out-of-bounds read via non-object fields in Discovery naming-service reply parsing
core-osv · Original sourcePublished 21 Oct 2026, 12:18 UTC
The Discovery naming-service reply parser in Apache bRPC (versions < 1.18.0) calls RapidJSON object-only accessors (FindMember) on JSON values without first validating that those values are objects. A malformed Discovery response whose data/service members or instances list contain non-object entries (e.g. a bare integer) triggers the RapidJSON object-access precondition on the client, reading memory out of bounds and potentially crashing the bRPC client. Root Cause: In src/brpc/policy/discovery_naming_service.cpp, DiscoveryNamingService::GetServers() and DiscoveryNames::ListDiscoveryNodes() access JSON values with member functions on non-object values. RapidJSON only defines these operations for object types; invoking them on a non-object violates the class invariant and results in undefined behavior (out-of-bounds read), commonly crashing the process. Affected Scenarios: An operator-configured (or compromised) Discovery backend returns a malformed /discovery/nodes or /discovery/fetchs response whose data/service/instance entries are not JSON objects, crashing any bRPC client that refreshes its server list. How to Fix: 1. Upgrade bRPC to version 1.18.0 or later, which fixes this issue. 2. Apply this patch: https://github.com/apache/brpc/pull/3533 The fix validates that the Discovery response data, per-service data, and instance entries are JSON objects (and skips non-object node/instance entries and rejects non-object data/service values) before calling member accessors.
osv:CVE-2026-87849
Complete source record
{
"id": "8f41c37a7cec9ca51c55eadd8506258a9de15f27cf7560a9cffa04dfa449f33f",
"url": "https://osv.dev/vulnerability/CVE-2026-87849",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Apache bRPC: Out-of-bounds read via non-object fields in Discovery naming-service reply parsing",
"summary": "The Discovery naming-service reply parser in Apache bRPC (versions < 1.18.0) calls RapidJSON object-only accessors (FindMember) on JSON values without first validating that those values are objects. A malformed Discovery response whose data/service members or instances list contain non-object entries (e.g. a bare integer) triggers the RapidJSON object-access precondition on the client, reading memory out of bounds and potentially crashing the bRPC client. Root Cause: In src/brpc/policy/discovery_naming_service.cpp, DiscoveryNamingService::GetServers() and DiscoveryNames::ListDiscoveryNodes() access JSON values with member functions on non-object values. RapidJSON only defines these operations for object types; invoking them on a non-object violates the class invariant and results in undefined behavior (out-of-bounds read), commonly crashing the process. Affected Scenarios: An operator-configured (or compromised) Discovery backend returns a malformed /discovery/nodes or /discovery/fetchs response whose data/service/instance entries are not JSON objects, crashing any bRPC client that refreshes its server list. How to Fix: 1. Upgrade bRPC to version 1.18.0 or later, which fixes this issue. 2. Apply this patch: https://github.com/apache/brpc/pull/3533 The fix validates that the Discovery response data, per-service data, and instance entries are JSON objects (and skips non-object node/instance entries and rejects non-object data/service values) before calling member accessors.",
"evidence": "osv:CVE-2026-87849",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2026-87849",
"aliases": [
"CVE-2026-87849"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/apache/brpc",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "94f1bbd32845a45f0218dfe43e25791252bdcb72"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "1.18.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
},
{
"range": [
{
"introduced": "0"
},
{
"fixed": "1.18.0"
}
],
"source": "DESCRIPTION"
}
]
}
}
],
"versions": [
"1.13.0",
"1.0.0",
"1.0.0-rc02",
"1.0.0-rc01",
"0.9.8-rc01",
"0.9.7-rc02",
"0.9.7-rc03",
"0.9.7",
"0.9.7-rc01",
"0.9.6-rc03",
"0.9.6-rc02",
"0.9.6-rc01",
"0.9.6",
"0.9.5",
"v0.9.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-87849.json"
}
}
],
"modified": "2026-10-28T02:30:48.876832409Z",
"provider": "osv",
"references": [
"https://github.com",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/87xxx/CVE-2026-87849.json",
"https://lists.apache.org/thread/2pf15ojj0vr7rtx95677kgtl1mx3gdgb",
"https://nvd.nist.gov/vuln/detail/CVE-2026-87849",
"https://github.com/apache/brpc/pull/3533"
],
"provider_metadata": {
"cwe_ids": [
"CWE-125"
],
"cna_assigner": "apache",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/87xxx/CVE-2026-87849.json"
}
},
"related_cves": [
{
"value": "CVE-2026-87849",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 517188,
"published_at": "2026-10-21T12:18:29.706+00:00"
}