CVE-2025-59789: Uncontrolled Recursion DoS in Apache bRPC json2pb
- Vendor
- Apache Software Foundation
CVE-2025-59789 is an uncontrolled recursion vulnerability in the json2pb component of Apache bRPC affecting versions prior to 1.15.0. The issue arises because json2pb uses RapidJSON to parse JSON input, and RapidJSON's default parsing behavior is recursive. When a bRPC server or application processes attacker-supplied JSON containing excessively deep nested structures, the recursive parser can exhaust the process stack and crash. The vulnerable scenarios described are bRPC servers using protobuf messages to serve HTTP+JSON requests from untrusted networks, and applications that directly call JsonToProtoMessage on untrusted input. The fix introduces a recursion depth limit, defaulting to 100, and applies to ProtoMessageToJson, ProtoMessageToProtoJson, JsonToProtoMessage, and ProtoJsonToProtoMessage.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
A remote attacker can trigger stack exhaustion and crash the affected server or process by sending deeply nested recursive JSON data. Based on the provided information, the impact is denial of service rather than code execution: the target becomes unavailable or the request-handling process terminates when the parser overflows the stack.
Mitigation
If you can’t patch tonight, do this now.
Until the fix is deployed, reduce exposure by preventing untrusted clients from sending arbitrary deep JSON payloads to affected bRPC HTTP+JSON endpoints, especially those converting JSON into protobuf messages. Where possible, place affected services behind input validation, schema enforcement, request filtering, API gateways, or WAF controls that reject excessively nested JSON. Restrict network access to trusted clients only. For deployments that must accept nested data, monitor for crashes and anomalous requests indicative of deep-recursion payloads. After patching, tune json2pb_max_recursion_depth to a safe value appropriate for expected message structures.
Remediation
Patch, then assume compromise.
Upgrade Apache bRPC to version 1.15.0 or later, which includes the fix for CVE-2025-59789. If an upgrade is not immediately possible, apply the patch referenced in Apache bRPC pull request #3099. The fix adds a recursion depth limit with a default value of 100. After remediation, review application behavior for legitimate JSON or protobuf payloads with nesting deeper than the configured limit, and adjust the json2pb_max_recursion_depth gflag if operationally necessary.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Frequently asked questions
- Is CVE-2025-59789 exploited in the wild?
- As of Sep 25, 2026, Mallory has no reports of CVE-2025-59789 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2025-59789?
- As of Sep 25, 2026, Mallory has found no public exploit for CVE-2025-59789.
- Is there a patch for CVE-2025-59789?
- Upgrade Apache bRPC to version 1.15.0 or later, which includes the fix for CVE-2025-59789. If an upgrade is not immediately possible, apply the patch referenced in Apache bRPC pull request #3099.
- What products are affected by CVE-2025-59789?
- Apache Software Foundation Brpc.
- How severe is CVE-2025-59789?
- CVE-2025-59789 has a CVSS v3.1 score of 7.5 (High) and an EPSS score of 1.3% (70th percentile) as of Sep 25, 2026.
Recent activity
9 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.