Details
Proof-of-concept input
A minimal payload that triggers the bug for an array of int:
zigzag-encoded long: math.MaxInt64 (block element count)
EOF (no further bytes)
The decoder reads the block-count header, enters the loop, fails to read the first element (EOF), records the error, and then iterates math.MaxInt64 − 1 further times calling the inner decoder as a no-op. Wall-clock cost on commodity hardware: indefinite — the goroutine pins one CPU core until the process is OOM-killed, deadline-cancelled, or terminated externally. The classic *"a few seconds per request"* characterisation applies only to small-but-still-pathological block counts in the 10⁸–10⁹ range (e.g. 200_999_000 in TestDecoder_SkipArrayEOF); the architectural ceiling is math.MaxInt64.
A negative block count (-N) is also legal in Avro (signals an N-element block with an explicit byte length); the same iteration pattern applies once the count is negated.
References
- Fix PR: iskorotkov/avro#4 (callback path)
- Fix commits: `b124caa` (skip helpers), `2ce4242` (callback path)
- Release: `v2.33.0`
- Security policy: `SECURITY.md`
- Related advisories on this fork: `GHSA-mc57-h6j3-3hmv` (integer overflow — same large-block-count payload also triggers cumulative-arithmetic overflow there), `GHSA-mx64-mj3q-7prj` (unbounded map allocation — the policy-level bound on well-formed huge inputs)
- Cross-module precedent on
hamba/avro: `GO-2023-1930` /CVE-2023-37475/GHSA-9x44-9pgq-cf45 - Upstream (read-only): `hamba/avro`
Credits
- Discovery and fixes (commits
b124caaskip helpers and2ce4242callback path, PR #4): Daniel Błażewicz (@klajok) - Release authorship: Ivan Korotkov (@iskorotkov)
Timeline
- 2026-04-28 — Skip-decoder fix (
b124caa) merged. - 2026-04-30 — Callback-decoder fix (PR #4,
2ce4242) merged. - 2026-05-06 —
v2.33.0tagged and released. - 2026-05-11 — Advisory published.
- 2026-05-15 — Advisory revised.