Advisory

GO-2026-5046

Also known as: CVE-2026-46385, GHSA-w8j3-pq8g-8m7w

Summary

CPU exhaustion in Avro decoder in github.com/iskorotkov/avro/v2 and github.com/hamba/avro/v2

Details

The Avro array and map decoders loop over an attacker-controlled block-count value without checking the underlying reader's error state inside the loop body. Reader.ReadBlockHeader returns the count as a Go int, which is 64-bit on amd64 and arm64 targets. A producer can declare a block of up to math.MaxInt64 elements followed by EOF or any truncated payload, and the decoder will attempt that many no-op iterations before propagating the error.

The realistic ceiling is indefinite until the worker is killed externally. A single hostile payload pins a CPU core until the process is OOM-killed, deadline-cancelled, or terminated, resulting in a remote, unauthenticated denial-of-service.

The fix exits the loop on the first inner-decode error.

Severity

Not rated by the source.

Dates

Published
2026-07-27 16:16 UTC
Modified
2026-08-05 03:41 UTC

Affected packages and fixes

github.com/iskorotkov/avro/v2

Go · All systems

Affected

  • introduced 0, fixed 2.33.0 (semver)

Fixed versions

2.33.0

Fix

github.com/hamba/avro/v2

Go · All systems

Affected

  • introduced 0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences