← Back to CVE Explorer

CVE-2026-78048

Full vulnerability record from the local CVENow database.

Description

A reachable-assertion flaw in the HPACK header-compression decoder of the HTTP/2 (h2/gRPC) stack in Apache bRPC (version < 1.18.0) on all platforms allows a remote attacker to crash the server process by sending a crafted sequence of HPACK headers, resulting in a denial of service. Root Cause: In src/brpc/details/hpack.cpp, IndexTable::Init sizes the dynamic-table ring buffer as num_headers = max_size / (32 + 2), i.e. it assumes a minimum table entry of 34 bytes (name >= 1 byte + value >= 1 byte + 32 bytes of overhead). However, RFC 7541 section 4.1 specifies that the minimum entry size is 33 bytes, because the value may be empty (name >= 1 byte + value == 0 + 32 bytes). For the default 4096-byte table this allocates only 120 slots (4096/34). Eviction in AddHeader is driven by byte usage (_max_size), not by slot count, so a peer can add 121 minimal 33-byte entries (121*33 = 3993 <= 4096) without triggering eviction. The 121st AddHeader then hits CHECK(!_header_queue.full()), which aborts the process. Affected Scenarios: Use a bRPC server that serves HTTP/2 or gRPC requests (e.g. via the h2 protocol) from an untrusted network. The malicious header block is processed during HPACK decoding of incoming requests without authentication. How to Fix: (Choose one of the following options)  1. Upgrade bRPC to version 1.18.0, which fixes this issue. 2. Apply this patch: https://github.com/apache/brpc/pull/3462 Note: The fix sizes the dynamic table for the 33-byte minimum entry (max_size / (32 + 1)) and ensures at least one ring-buffer slot is kept when max_size is smaller than the minimum entry, so that initialization cannot fail on malloc(0).

Severity
Not scored
CVSS score
Not available
Vulnerability status
Deferred
Source identifier
Published
2026-10-21 12:17:23.213000
Last modified
2026-10-26 20:10:00.160000
View original CVE JSON
{
  "id": "CVE-2026-78048",
  "sourceIdentifier": "[email protected]",
  "published": "2026-10-21T12:17:23.213",
  "lastModified": "2026-10-26T20:10:00.160",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "A reachable-assertion flaw in the HPACK header-compression decoder of the HTTP/2 (h2/gRPC) stack in Apache bRPC (version < 1.18.0) on all platforms allows a remote attacker to crash the server process by sending a crafted sequence of HPACK headers, resulting in a denial of service.\n\nRoot Cause:\nIn src/brpc/details/hpack.cpp, IndexTable::Init sizes the dynamic-table ring buffer as num_headers = max_size / (32 + 2), i.e. it assumes a minimum table entry of 34 bytes (name >= 1 byte + value >= 1 byte + 32 bytes of overhead). However, RFC 7541 section 4.1 specifies that the minimum entry size is 33 bytes, because the value may be empty (name >= 1 byte + value == 0 + 32 bytes). For the default 4096-byte table this allocates only 120 slots (4096/34). Eviction in AddHeader is driven by byte usage (_max_size), not by slot count, so a peer can add 121 minimal 33-byte entries (121*33 = 3993 <= 4096) without triggering eviction. The 121st AddHeader then hits CHECK(!_header_queue.full()), which aborts the process.\n\nAffected Scenarios:\nUse a bRPC server that serves HTTP/2 or gRPC requests (e.g. via the h2 protocol) from an untrusted network. The malicious header block is processed during HPACK decoding of incoming requests without authentication.\n\nHow to Fix: \n(Choose one of the following options) \n1. Upgrade bRPC to version 1.18.0, which fixes this issue.\n2. Apply this patch: https://github.com/apache/brpc/pull/3462\n\nNote:\nThe fix sizes the dynamic table for the 33-byte minimum entry (max_size / (32 + 1)) and ensures at least one ring-buffer slot is kept when max_size is smaller than the minimum entry, so that initialization cannot fail on malloc(0)."
    },
    {
      "lang": "es",
      "value": "Una vulnerabilidad de aserción alcanzable en el decodificador de compresión de encabezados HPACK de la pila HTTP/2 (h2/gRPC) en Apache bRPC (versión anterior a la 1.18.0) en todas las plataformas permite a un atacante remoto provocar el bloqueo del proceso del servidor enviando una secuencia manipulada de encabezados HPACK, lo que resulta en una denegación de servicio.\\n\\nCausa raíz:\\nEn src/brpc/details/hpack.cpp, IndexTable::Init dimensiona el búfer circular de tabla dinámica como num_headers = max_size / (32 + 2), es decir, asume una entrada mínima de tabla de 34?bytes (name >= 1?byte + value mayor o igual a 1?byte + 32?bytes de overhead). Sin embargo, la RFC?7541 sección?4.1 especifica que el tamaño mínimo de entrada es de 33?bytes, porque el valor puede estar vacío (name mayor o igual a 1?byte + value == 0 + 32?bytes). Para la tabla predeterminada de 4096?bytes esto asigna solo 120 ranuras (4096/34). La expulsión en AddHeader se basa en el uso de bytes (_max_size), no en el recuento de ranuras, de modo que un par puede añadir 121 entradas mínimas de 33?bytes (12133 = 3993 menor o igual a 4096) sin activar la expulsión. La 121ª AddHeader entonces alcanza CHECK(!_header_queue.full()), lo que aborta el proceso.\\n\\nEscenarios afectados:\\nUtilice un servidor bRPC que atienda solicitudes HTTP/2 o gRPC (p.?ej., a través del protocolo h2) desde una red no confiable. El bloque de encabezados malicioso se procesa durante la decodificación HPACK de las solicitudes entrantes sin autenticación.\\n\\nCómo corregir:\\n1. Actualice bRPC a la versión 1.18.0, que corrige este problema.\\n2. Aplique este parche: https://github.com/apache/brpc/pull/3462\\n\\nNota:\\nLa corrección dimensiona la tabla dinámica para la entrada mínima de 33?bytes (max_size / (32 + 1)) y garantiza que al menos una ranura del búfer circular se mantenga cuando max_size sea menor que la entrada mínima, de modo que la inicialización no pueda fallar en malloc(0)."
    }
  ],
  "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": {},
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Primary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-617"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://lists.apache.org/thread/2pf15ojj0vr7rtx95677kgtl1mx3gdgb",
      "source": "[email protected]"
    }
  ]
}