# CVE-2026-86147: Apache bRPC: Arbitrary file creation/truncation via /flags and unbounded profiling duration via /pprof


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** No
- **Published:** 21 Oct 2026
- **Updated:** 21 Oct 2026
- **Also known as:** GHSA-jm3m-mg8w-9wmc

## What is CVE-2026-86147?

CVE-2026-86147 is a vulnerability in Apache bRPC, published on 21 Oct 2026. 

### Official description

External control of file name or path and uncontrolled resource consumption in Apache bRPC (version < 1.18.0) on all platforms allows remote attackers who can reach the builtin service port to create directories and truncate/overwrite files with the privileges of the server process, or to hold the process-wide CPU/contention profiler for an arbitrarily long time.

Root Cause:
1. The builtin /flags service allows gflags carrying a validator to be modified at runtime via ?setvalue=. The bvar/mbvar dump path gflags (bvar_dump_file, bvar_dump_tabs, mbvar_dump_file) were registered with an accept-anything validator whose only purpose was to wake the dumping thread. A remote attacker could therefore repoint the dump path (e.g. GET /flags/bvar_dump_file?setvalue=/victim/dir/target followed by GET /flags/bvar_dump?setvalue=true, or the equivalent for mbvar_dump_file, which is used verbatim without a forced suffix), making the dumping thread recursively create directories and open/truncate files at attacker-chosen locations. Tab names in bvar_dump_tabs were appended to the path without sanitization, allowing '..' to escape the configured directory.
2. The /pprof builtin service did not clamp the ?seconds= parameter to FLAGS_max_profiling_seconds (a limit that /hotspots enforced). A single request such as ?seconds=2147483647 made the handler sleep for decades while holding the process-wide gperftools CPU profiler or bthread contention profiler, so /hotspots/cpu and /hotspots/contention returned 503 for everyone else during that time.

Affected Scenarios:
Any Apache bRPC server exposing the builtin services (enabled by default on the same port as normal RPC traffic) to untrusted networks.

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/3523 

Note:
After the fix, bvar_dump_file, bvar_dump_tabs and mbvar_dump_file can no longer be modified at runtime through the /flags builtin service. They can still be changed programmatically via google::SetCommandLineOption(), taking effect on the next dump cycle. The profiling duration of /pprof is now capped by the -max_profiling_seconds gflag (default 300 seconds), which can be adjusted by the server owner.

Weakness: CWE-73 (External Control of File Name or Path), CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2026-86147?


## How do I fix CVE-2026-86147?

No fix has been published for CVE-2026-86147 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-86147 being exploited?

There is no known exploitation of CVE-2026-86147 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-86147 and fix it if it is affected.

What it is: CVE-2026-86147 is a vulnerability in Apache bRPC, published on 21 Oct 2026. 
Exploitation: There is no known exploitation of CVE-2026-86147 in the wild and no public exploit code.

Affected product: Apache bRPC. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-86147/ (Markdown: https://insights.sbomify.com/CVE-2026-86147/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-86147
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-86147
- OSV: https://osv.dev/vulnerability/CVE-2026-86147

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-86147/
Summaries are generated and may contain mistakes; the official description above is the record.
