Skip to main content

iskorotkov/avro CVE-2026-46385

| EUVDEUVD-2026-33444 HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-05-18 https://github.com/iskorotkov/avro GHSA-w8j3-pq8g-8m7w
8.7
CVSS 4.0 · Vendor: https://github.com/iskorotkov/avro
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify service deserializing untrusted Avro
  2. Delivery
    Craft block header with math.MaxInt64 count and EOF
  3. Exploit
    Submit payload to decoder endpoint
  4. Execution
    Decoder enters unbounded iteration loop
  5. Persist
    Goroutine pins CPU core indefinitely
  6. Impact
    Repeat across workers to exhaust service capacity

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The target application must deserialize Avro data from an untrusted source using github.com/iskorotkov/avro/v2 < v2.33.0 or github.com/hamba/avro/v2 <= v2.31.0, and must invoke one of the four vulnerable code paths - array or map decoding via sliceSkipDecoder, mapSkipDecoder, Reader.ReadArrayCB, or Reader.ReadMapCB - which are reached through generic decoding and unmarshaling paths and the skip helpers used during schema projection. No authentication is required per the CVSS vector (PR:N) and no user interaction is needed (UI:N); the attacker need only deliver bytes to the decoder. Limiting factors: services that do not accept attacker-controlled Avro payloads, that wrap decoding with strict per-request CPU/time budgets, or that have already configured MaxSliceAllocSize / MaxMapAllocSize policy caps will see reduced or no impact. The architectural worst case (math.MaxInt64 iterations) applies on amd64/arm64 targets where Go's int is 64-bit; 32-bit targets cap at a smaller but still effectively unbounded value.

Impact

The CVSS 4.0 vector AV:N/AC:L/AT:N/PR:N/UI:N/VA:H confirms network attack vector, low complexity, no privileges, no user interaction, and high availability impact - consistent with the description's 'remote, unauthenticated denial-of-service' framing. Real-world risk depends entirely on whether an exposed service deserializes attacker-controlled Avro payloads (Kafka consumers, schema-registry-backed APIs, ingestion pipelines); for such services the impact is severe because a single small payload (header bytes plus EOF) can pin a goroutine indefinitely and exhaust worker pools. There is no EPSS score or KEV listing supplied, and no public exploit identified at time of analysis, though the advisory itself documents the exact triggering payload, lowering the bar for weaponization. Note that the fork iskorotkov/avro is a relatively low-distribution package compared with upstream hamba/avro/v2, which is archived and will not receive a fix - consumers still pinned to the upstream import path remain exposed indefinitely unless they migrate or apply a go.mod replace directive.

Exploit ScenarioDerived

An attacker who can submit an Avro-encoded message to a vulnerable service - for example, a Kafka consumer, a schema-registry-backed HTTP endpoint, or an ingestion pipeline using hamba/avro or iskorotkov/avro < v2.33.0 - crafts a payload whose array or map block header declares math.MaxInt64 elements followed by EOF. The advisory documents this exact minimal payload as a proof-of-concept; on receipt, the decoder enters its iteration loop, the first inner Decode returns EOF, and the goroutine then spins through ~9.2×10^18 no-op iterations, pinning one CPU core until the process is OOM-killed or externally terminated. Repeating the request against multiple workers exhausts the entire service's decoding capacity.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – May 29, 2026

Remote unauthenticated denial-of-service in the iskorotkov/avro Go Avro decoder (and the archived upstream hamba/avro/v2) allows a malicious producer to pin a CPU core indefinitely by declaring an Avro array or map block with an attacker-controlled element count up to math.MaxInt64. The array/map decoders in codec_skip.go and reader_generic.go iterate the declared count without checking the Reader's accumulated error state, so a truncated payload triggers ~9.2×10^18 no-op iterations. No public exploit identified at time of analysis beyond the advisory's documented proof-of-concept payload; CVSS 4.0 scores this 8.7 (high) reflecting network reachability with high availability impact.

Earlier versions of this analysis (2)
v2 May 29, 2026 - 20:28 cvss changed CVSS 8.7

Remote unauthenticated denial-of-service in the iskorotkov/avro Go module (and its upstream hamba/avro fork) versions prior to v2.33.0 allows attackers to pin a CPU core indefinitely by sending a single crafted Avro payload that declares an array or map block count up to math.MaxInt64. The Avro array/map decoders iterate the attacker-controlled block count without checking the reader's error state, so a truncated payload causes ~9.2 × 10¹⁸ no-op iterations. No public exploit identified at time of analysis, but a proof-of-concept payload is documented in the advisory itself, and the CVSS 4.0 score of 8.7 reflects the network-reachable, no-privilege, high-availability impact.

v1 May 18, 2026 - 17:32 CVSS 7.5

Remote unauthenticated denial-of-service in the Go Avro decoder github.com/iskorotkov/avro/v2 (and the archived upstream github.com/hamba/avro/v2) lets a single malformed payload pin a CPU core indefinitely. Array and map decoders iterate over an attacker-controlled block-count up to math.MaxInt64 (~9.2×10^18) without checking the reader's error state, so a truncated payload turns into a near-infinite no-op loop until the process is OOM-killed or externally terminated. No public exploit identified at time of analysis, but a regression test (TestDecoder_ArrayMultiBlockExceedsMaxInt) and a minimal POC payload are documented in the advisory.

RemediationAI

Vendor-released patch: github.com/iskorotkov/avro/v2 v2.33.0, applied via 'go get github.com/iskorotkov/avro/v2@latest' followed by 'go mod tidy', with fix commits b124caa (skip helpers) and 2ce4242 (callback path via PR #4). Consumers wanting to keep the original hamba import path can add a go.mod replace directive 'replace github.com/hamba/avro/v2 => github.com/iskorotkov/avro/v2 v2.33.0', noting that replace directives only apply to the main module so transitive consumers must add their own. For defense-in-depth against well-formed but oversized payloads - which the error-propagation fix does not address - configure avro.Config with explicit MaxSliceAllocSize, MaxMapAllocSize (new in v2.33.0, default zero meaning unbounded), and MaxByteSliceSize caps; the trade-off is that legitimate large arrays or maps will be rejected. If upgrading is not immediately possible, apply per-request decode timeouts, run decoder workers under CPU quotas, and reject payloads whose advertised block count exceeds a schema-specific sane bound; these add latency and require knowledge of expected payload shapes. Full details at https://github.com/iskorotkov/avro/security/advisories/GHSA-w8j3-pq8g-8m7w.

Affected VersionsENISA

avro < 2.33.0

Affected Packages

go github.com/hamba/avro/v2 no fix
go github.com/iskorotkov/avro/v2 fix: 2.33.0
euvd avro fix: 2.33.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Apache Avro encodes arrays and maps as a sequence of blocks; each block begins with a zigzag-encoded long declaring how many elements follow. The affected decoders - sliceSkipDecoder.Decode and mapSkipDecoder.Decode in codec_skip.go, and Reader.ReadArrayCB / Reader.ReadMapCB in reader_generic.go - read that count via Reader.ReadBlockHeader, which returns Go int (64-bit on amd64/arm64), and then loop that many times invoking an inner Decode. Once the underlying Reader sets r.Error (e.g., from EOF on a truncated payload), inner Decode calls short-circuit and become no-ops, but the loop counter continues to the original bound. The package CPE pkg:go/github.com_iskorotkov_avro_v2 identifies the fork, and the same defect existed in the read-only upstream github.com/hamba/avro/v2. The root cause maps to CWE-400 (Uncontrolled Resource Consumption): an external input directly determines the upper bound of a CPU-bound loop without validation against the actual stream length or any policy cap.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/iskorotkov/avro) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE HIGH
Red Hat 7.5 HIGH

Primary rating from Vendor (https://github.com/iskorotkov/avro).

CVSS VectorVendor: https://github.com/iskorotkov/avro

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Analysis Updated
May 29, 2026 - 20:28 vuln.today
v3 - CVSS changed
Analysis Updated
May 29, 2026 - 20:28 vuln.today
v2 - CVSS changed
CVSS changed
May 29, 2026 - 20:22 NVD
7.5 (HIGH) 8.7 (HIGH)

DescriptionCVE.org

CPU Exhaustion in Avro Decoder via Unbounded Block-Count Iteration

Summary

The Avro array and map decoders looped 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 / arm64 targets - so a producer can declare a block of up to math.MaxInt64 (~9.2 × 10¹⁸) 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. Remote, unauthenticated denial-of-service.

The fix exits the loop on the first inner-decode error. It does not bound the loop length itself; for full coverage on untrusted inputs, also configure Config.MaxSliceAllocSize and Config.MaxMapAllocSize (the latter introduced in v2.33.0).

Description

Avro arrays and maps are encoded as one or more blocks; each block declares an element count followed by that many encoded elements. The decoder reads the block count as a zigzag-encoded long, then iterates that many times calling an inner decoder.

Three iteration sites trusted the block count without checking the reader's accumulated error state between iterations:

  • codec_skip.go sliceSkipDecoder.Decode - skip helper for arrays.
  • codec_skip.go mapSkipDecoder.Decode - skip helper for maps.
  • reader_generic.go Reader.ReadArrayCB and Reader.ReadMapCB - callback-based decoders used by generic and unmarshaling code paths.

Because the inner Decode(nil, r) call is a no-op when r has already errored (it returns immediately without consuming bytes), the loop would run to completion even after the first iteration's EOF. On amd64 / arm64, Reader.ReadBlockHeader returns the count as int (= int64), so the loop bound is whatever the wire payload specified, up to math.MaxInt64. A modest 200-million-count payload (well under 2³¹) already burns several seconds; a math.MaxInt − 2 payload (the value used in the regression test TestDecoder_ArrayMultiBlockExceedsMaxInt from PR #9) effectively pins the goroutine until external kill.

This overlaps with GHSA-mc57-h6j3-3hmv: the same large-block-count payload that drives the unbounded loop here also drives the cumulative-arithmetic overflow there (cross-platform), and on a 32-bit target additionally triggers the union-index / byte-slice narrowing.

Affected components

FileFunctionPRFix commit
codec_skip.gosliceSkipDecoder.Decode-b124caa
codec_skip.gomapSkipDecoder.Decode-b124caa
reader_generic.goReader.ReadArrayCB#42ce4242
reader_generic.goReader.ReadMapCB#42ce4242

These are the audited and patched sites. Any other code path that iterates over an attacker-controlled count while calling a Reader-style decoder is structurally susceptible to the same pattern; reviewers of consumer code should grep for for range l / for i := 0; i < int(l); i++ near Reader method calls and confirm an in-loop error check.

Technical details

Vulnerable pattern:

go
for range l {
    d.decoder.Decode(nil, r)
    // r.Error may have been set by Decode; loop continues regardless.
}

After r.Error != nil, subsequent Decode calls short-circuit and return without consuming bytes or doing useful work, but the loop control variable still runs to l. With l = math.MaxInt64, the loop body executes ~9.2 × 10¹⁸ times - effectively infinite for any realistic timeout.

Fixed pattern (b124caa, 2ce4242):

go
for range l {
    d.decoder.Decode(nil, r)
    if r.Error != nil {
        break
    }
}

The fix terminates the loop on the first inner error. It does not bound l itself - a well-formed payload that actually contains N encoded null elements still iterates N times. The MaxSliceAllocSize / MaxMapAllocSize caps are the policy-level bound on that case (see Mitigation).

Fixed behavior

The reader's accumulated error is checked after every inner Decode in the four affected loops. Decoder errors now surface in O(1) iterations instead of O(blockCount) when the underlying read fails mid-stream.

Affected versions

  • github.com/hamba/avro/v2 - all versions up to and including v2.31.0 (repository is read-only upstream).
  • github.com/iskorotkov/avro/v2 - all versions prior to v2.33.0.

Fixed versions

github.com/iskorotkov/avro/v2 v2.33.0 and later. There is no upstream fix for github.com/hamba/avro/v2 - module path is archived. Migrate to the fork as described under Mitigation.

Mitigation

Migrate from github.com/hamba/avro/v2 to github.com/iskorotkov/avro/v2 >= v2.33.0. Replace the import path and run go mod tidy:

bash
go get github.com/iskorotkov/avro/v2@latest

Or, for consumers that prefer the original import path, a replace directive in go.mod:

replace github.com/hamba/avro/v2 => github.com/iskorotkov/avro/v2 v2.33.0

replace is honoured only for the main module of a build - transitive consumers must add their own replace, or migrate the import path directly.

The error-propagation fix runs on the existing decode path and requires no configuration.

For defense-in-depth against well-formed but oversized payloads (where the fix above does not help, because no error fires), set explicit allocation caps:

go
cfg := avro.Config{
    MaxByteSliceSize:  102_400,
    MaxSliceAllocSize: 10_000,
    MaxMapAllocSize:   10_000,
}.Freeze()

decoder := cfg.NewDecoder(schema, reader)

MaxMapAllocSize is new in v2.33.0 and opt-in (default zero, which leaves the previous unbounded behavior). Without setting it, a producer that ships a math.MaxInt64-count block still consumes the corresponding memory and CPU; see GHSA-mx64-mj3q-7prj for the cumulative-allocation enforcement details.

If you cannot upgrade immediately, the structural workarounds are application-level: per-request decode timeouts, isolated decoder workers under CPU quotas, and rejection of payloads whose advertised block count exceeds a known sane bound for your schema.

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

Credits

  • Discovery and fixes (commits b124caa skip helpers and 2ce4242 callback 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.0 tagged and released.
  • 2026-05-11 - Advisory published.
  • 2026-05-15 - Advisory revised.

Executive ViewAI

Why It Matters

The iskorotkov/avro Go Avro decoder contains a remote unauthenticated denial-of-service vulnerability allowing attackers to indefinitely exhaust CPU resources; publicly available exploit code exists. Organizations processing Avro data face immediate risk of service disruption and should prioritize emergency remediation.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 87% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy