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

CVE-2026-82231: Apache bRPC Thrift Client DOS Vulnerability

CVE-2026-82231 is a denial of service vulnerability in Apache bRPC Thrift client that causes process termination when malformed exception structs are received. This post covers technical details, affected versions, and mitigation.

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

CVE-2026-82231 is a denial of service vulnerability in Apache bRPC versions prior to 1.18.0 when built with the optional WITH_THRIFT flag. A malicious Thrift server peer can crash the entire client process by returning a malformed T_EXCEPTION reply. The client decodes the reply without catching exceptions thrown by Apache Thrift, including TProtocolException, TTransportException, and std::length_error. The uncaught exception unwinds out of the bthread task function, triggering std::terminate() and terminating every in-flight RPC in the process. The flaw is classified under [CWE-248] Uncaught Exception.

Critical Impact

A single malicious or compromised Thrift server can crash the entire client process, terminating every concurrent RPC handled by that process.

Affected Products

  • Apache bRPC versions prior to 1.18.0
  • Builds compiled with the WITH_THRIFT CMake option (off by default)
  • Any application using the Apache bRPC Thrift client code path

Discovery Timeline

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

Technical Details for CVE-2026-82231

Vulnerability Analysis

The vulnerability resides in the Thrift client response path of Apache bRPC. When a server peer returns a T_EXCEPTION reply, the client attempts to deserialize the embedded exception struct. Apache Thrift's decoder throws TProtocolException, TTransportException, or std::length_error when the struct is malformed. The bRPC client does not wrap the decode call in a try/catch block.

The uncaught exception propagates out of the bthread task function. Because bthread task entry points are not permitted to leak exceptions, the C++ runtime invokes std::terminate(). This terminates the entire process, not just the failing RPC.

The threat model documented in THREAT_MODEL.md treats the server peer as untrusted on the client response path. A single compromised or hostile backend can therefore abort every concurrent request serviced by the client process.

Root Cause

The root cause is a missing exception handler around the Thrift reply deserialization code path. The decoder can raise structured exceptions on malformed input, but the surrounding bthread task function lacks defensive handling. This matches the [CWE-248] Uncaught Exception weakness pattern.

Attack Vector

An attacker controlling or impersonating a Thrift server responds to a client request with a crafted T_EXCEPTION payload containing a malformed exception struct. The client-side decode throws, unwinds through the bthread scheduler, and the process terminates. Exploitation requires that the target application was compiled with WITH_THRIFT enabled, which is not the default build configuration.

See the Apache Mailing List Thread for upstream discussion of the issue.

Detection Methods for CVE-2026-82231

Indicators of Compromise

  • Unexpected std::terminate() process exits in bRPC client applications with WITH_THRIFT enabled
  • Core dumps showing stack frames inside Thrift deserialization routines such as TBinaryProtocol::readStructBegin or TProtocolException constructors
  • Simultaneous RPC failures across unrelated clients served by the same bRPC process

Detection Strategies

  • Inspect build configurations for the WITH_THRIFT CMake flag and inventory any bRPC binaries below version 1.18.0
  • Enable core dump collection on bRPC client hosts and alert on crashes whose backtraces include apache::thrift::protocol symbols
  • Monitor service restarts and RPC error bursts correlated with responses from specific Thrift server peers

Monitoring Recommendations

  • Capture process-exit events and parent/child supervisor logs for bRPC-based services
  • Instrument Thrift server peer connections with per-peer error-rate metrics to isolate hostile endpoints
  • Forward crash telemetry and RPC error logs to a centralized analytics platform for correlation across hosts

How to Mitigate CVE-2026-82231

Immediate Actions Required

  • Upgrade Apache bRPC to version 1.18.0 or later on all hosts using Thrift client functionality
  • Audit build pipelines for the WITH_THRIFT option and disable it where Thrift is not required
  • Restrict Thrift client connections to trusted, authenticated server peers until patched

Patch Information

The fix is included in Apache bRPC 1.18.0. The upstream patch is published as pull request apache/brpc#3500 and adds exception handling around the Thrift client decode path so that malformed T_EXCEPTION replies produce an RPC error instead of terminating the process.

Workarounds

  • Rebuild bRPC without WITH_THRIFT if the Thrift client is not needed by the application
  • Place a trusted proxy between clients and third-party Thrift servers to validate reply framing
  • Isolate each bRPC client process so that a terminated process does not take down co-located RPC workloads
bash
# Rebuild bRPC with Thrift support disabled (default)
cmake -DWITH_THRIFT=OFF ..
make -j$(nproc)

# Or upgrade to the fixed release
git checkout 1.18.0
cmake ..
make -j$(nproc)

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.