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

CVE-2026-86147: Apache bRPC Path Traversal Vulnerability

CVE-2026-86147 is a path traversal flaw in Apache bRPC allowing remote attackers to create directories, overwrite files, and exhaust CPU resources. 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-86147 Overview

CVE-2026-86147 affects Apache bRPC versions prior to 1.18.0. The vulnerability combines external control of file name or path [CWE-73] with uncontrolled resource consumption in the builtin service port. Remote attackers who can reach the builtin service port can create directories and truncate or overwrite files with the privileges of the server process. The same flaw allows attackers to hold the process-wide CPU and contention profiler for an arbitrarily long duration, denying profiling access to legitimate operators.

Critical Impact

Attackers reaching the bRPC builtin service port can overwrite arbitrary files with server-process privileges and lock profiling subsystems through long-running /pprof requests.

Affected Products

  • Apache bRPC versions prior to 1.18.0
  • bRPC servers exposing builtin services on the normal RPC port
  • Deployments where the builtin /flags and /pprof endpoints are reachable from untrusted networks

Discovery Timeline

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

Technical Details for CVE-2026-86147

Vulnerability Analysis

The vulnerability resides in two distinct builtin services exposed by Apache bRPC. The /flags builtin permits runtime modification of gflags that carry a validator through the ?setvalue= query parameter. The gflags bvar_dump_file, bvar_dump_tabs, and mbvar_dump_file were registered with an accept-anything validator intended only to wake the dumping thread. A remote attacker can repoint the dump path to an attacker-chosen location, causing the dumping thread to recursively create directories and open or truncate files with the server process privileges.

The second flaw involves the /pprof builtin, which fails to clamp the ?seconds= parameter against FLAGS_max_profiling_seconds. The /hotspots endpoint enforces this limit, but /pprof does not. An attacker can submit a request with an extreme duration and hold the process-wide gperftools CPU profiler or bthread contention profiler indefinitely.

Root Cause

The accept-anything gflag validator on dump path variables permitted unrestricted runtime overwrite via the /flags service. Tab names supplied through bvar_dump_tabs were appended to the dump path without sanitization, allowing .. traversal to escape the configured directory. The mbvar_dump_file value was used verbatim without a forced suffix. The /pprof handler also lacked the maximum profiling duration check that /hotspots applied.

Attack Vector

An attacker reaching the builtin service port issues a request such as GET /flags/bvar_dump_file?setvalue=/victim/dir/target followed by GET /flags/bvar_dump?setvalue=true to trigger file truncation. For profiler lockup, a request like /pprof/profile?seconds=2147483647 causes the handler to sleep for decades. During that window, /hotspots/cpu and /hotspots/contention return 503 to all other callers.

No verified exploit code examples are available. See the Apache Mailing List Discussion for technical details.

Detection Methods for CVE-2026-86147

Indicators of Compromise

  • HTTP requests to /flags/bvar_dump_file, /flags/bvar_dump_tabs, or /flags/mbvar_dump_file containing ?setvalue= parameters pointing outside expected directories
  • Requests to /pprof endpoints with seconds= values exceeding the organization's -max_profiling_seconds policy
  • Unexpected directory creation or file truncation events owned by the bRPC server process
  • 503 responses from /hotspots/cpu or /hotspots/contention while another /pprof request is in flight

Detection Strategies

  • Inspect reverse proxy and application logs for /flags/*?setvalue= patterns originating from non-administrative source addresses
  • Correlate file system auditing events (such as Linux auditd openat with O_TRUNC) against the bRPC process identifier
  • Alert on /pprof requests where the seconds parameter exceeds a defined threshold

Monitoring Recommendations

  • Enable access logging on the bRPC builtin service port and forward it to a centralized log platform
  • Baseline normal /pprof and /flags traffic sources and alert on first-seen clients
  • Monitor process-level file descriptor activity for writes outside expected bvar_dump_file directories

How to Mitigate CVE-2026-86147

Immediate Actions Required

  • Upgrade Apache bRPC to version 1.18.0 on all exposed servers
  • Restrict access to the builtin service port using network ACLs so only administrative hosts can reach /flags and /pprof
  • Audit historical access logs for ?setvalue= and long seconds= parameters to identify prior abuse
  • Review file system paths writable by the bRPC service account and remove unnecessary write permissions

Patch Information

Upgrade to Apache bRPC version 1.18.0, which removes runtime modification of bvar_dump_file, bvar_dump_tabs, and mbvar_dump_file through the /flags builtin and caps /pprof duration by -max_profiling_seconds (default 300 seconds). The upstream fix is tracked in the Apache bRPC pull request 3523. After patching, these flags can still be changed programmatically through google::SetCommandLineOption(), applying on the next dump cycle.

Workarounds

  • Apply the upstream patch from Apache bRPC pull request 3523 if a full version upgrade is not immediately feasible
  • Place the bRPC builtin service behind authenticated reverse proxies that strip ?setvalue= and bound seconds= parameters
  • Run the bRPC process under a dedicated low-privilege account with no write access to sensitive directories
  • Adjust -max_profiling_seconds to a value appropriate for operational needs after patching
bash
# Configuration example
# Launch bRPC server with a conservative profiling cap after upgrading to 1.18.0
./brpc_server -max_profiling_seconds=60

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.