← Back to CVE Explorer

CVE-2026-87849

Full vulnerability record from the local CVENow database.

Description

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.

Severity
MEDIUM
CVSS score
4.3 (v3.1)
Vulnerability status
Deferred
Source identifier
Published
2026-10-21 13:20:04.603000
Last modified
2026-10-26 20:10:00.160000
View original CVE JSON
{
  "id": "CVE-2026-87849",
  "sourceIdentifier": "[email protected]",
  "published": "2026-10-21T13:20:04.603",
  "lastModified": "2026-10-26T20:10:00.160",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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.\n\nRoot Cause:\nIn 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.\n\nAffected Scenarios: \nAn 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.\n\nHow to Fix:\n1. Upgrade bRPC to version 1.18.0 or later, which fixes this issue.\n2. Apply this patch: https://github.com/apache/brpc/pull/3533\n\nThe 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."
    },
    {
      "lang": "es",
      "value": "El analizador de respuestas del servicio de nombres Discovery en Apache bRPC (versiones anteriores a la 1.18.0) llama a los accesores de objeto únicamente de RapidJSON (FindMember) sobre valores JSON sin validar primero que esos valores sean objetos. Una respuesta Discovery malformada cuyo miembro data/service o la lista de instancias contenga entradas que no sean objetos (p.?ej., un entero simple) activa la precondición de acceso a objetos de RapidJSON en el cliente, leyendo memoria fuera de los límites y potencialmente provocando el bloqueo del cliente bRPC.\\n\\nCausa raíz:\\nEn src/brpc/policy/discovery_naming_service.cpp, DiscoveryNamingService::GetServers() y DiscoveryNames::ListDiscoveryNodes() acceden a valores JSON con funciones de miembro sobre valores que no son objetos. RapidJSON solo define estas operaciones para tipos de objeto; invocarlas sobre un valor que no es objeto viola la invariancia de la clase y produce un comportamiento indefinido (lectura fuera de los límites), lo que suele provocar el bloqueo del proceso.\\n\\nEscenarios afectados:\\nUn backend Discovery configurado por el operador (o comprometido) devuelve una respuesta /discovery/nodes o /discovery/fetchs malformada cuyos elementos data/service/instance no son objetos JSON, provocando el bloqueo de cualquier cliente bRPC que actualice su lista de servidores.\\n\\nCómo corregirlo:\\n1. Actualice bRPC a la versión 1.18.0 o posterior, que corrige este problema.\\n2. Aplique este parche: https://github.com/apache/brpc/pull/3533\\n\\nLa corrección valida que los datos de la respuesta Discovery, los datos por servicio y las entradas de instancia sean objetos JSON (y omite las entradas de nodo/instancia que no son objetos y rechaza los valores data/service que no son objetos) antes de llamar a los accesores de miembro."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "Apache Software Foundation",
          "product": "Apache bRPC",
          "defaultStatus": "unaffected",
          "collectionURL": "https://github.com",
          "packageName": "apache/brpc",
          "packageURL": "pkg:github/apache/brpc",
          "versions": [
            {
              "version": "0",
              "lessThan": "1.18.0",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L",
          "baseScore": 4.3,
          "baseSeverity": "MEDIUM",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "LOW"
        },
        "exploitabilityScore": 2.8,
        "impactScore": 1.4
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-10-26T13:54:35.426140Z",
          "id": "CVE-2026-87849",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-125"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/apache/brpc/pull/3533",
      "source": "[email protected]"
    },
    {
      "url": "https://lists.apache.org/thread/2pf15ojj0vr7rtx95677kgtl1mx3gdgb",
      "source": "[email protected]"
    }
  ]
}