Advisory

GO-2026-5048

Also known as: GHSA-mx64-mj3q-7prj

Summary

Denial of service via unbounded map allocations in github.com/iskorotkov/avro/v2 and github.com/hamba/avro/v2

Details

The Avro map decoder accepts attacker-controlled block-element counts from the wire format and grows the destination map without enforcing an upper bound. A producer can declare an arbitrarily large map (in one block, or chunked across many sub-limit blocks) and exhaust process memory until the OOM killer fires.

The fix introduces Config.MaxMapAllocSize with cumulative enforcement across block boundaries. The new limit is opt-in: the field defaults to zero, which preserves the previous unbounded behavior for backward compatibility. Upgrading to v2.33.0 alone does not mitigate the issue; consumers of untrusted Avro data must explicitly set MaxMapAllocSize on their avro.Config.

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