Skip to main content

iskorotkov/avro CVE-2026-46384

| EUVDEUVD-2026-33443 HIGH
Integer Overflow or Wraparound (CWE-190)
2026-05-18 https://github.com/iskorotkov/avro GHSA-mc57-h6j3-3hmv
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. Recon
    Identify Avro-consuming Go endpoint
  2. Delivery
    Craft Avro stream with oversized length or wrap-inducing block count
  3. Exploit
    Deliver via Kafka topic, HTTP body, or OCF file
  4. Install
    Trigger int64→int narrowing or cumulative-size wrap
  5. C2
    Bypass MaxSliceAllocSize/MaxByteSliceSize check
  6. Execute
    Panic decoder via negative make or MinInt negation
  7. Impact
    Crash consumer goroutine, denying service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK

1 technique across 1 tactic: Execution

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 import github.com/hamba/avro/v2 (any version through v2.31.0) or github.com/iskorotkov/avro/v2 prior to v2.33.0 and must deserialize Avro data sourced from an attacker-controlled or untrusted channel - only an untrusted Avro stream is required, no authentication or user interaction. The cross-platform sub-issues (cumulative-size overflow in arrayDecoder/mapDecoder/mapDecoderUnmarshaler, math.MinInt negation in ReadBlockHeader, and negative-size make in ocf readBlock) are reachable on amd64 and arm64 builds against default configuration. The remaining narrowing primitives (readBytes, SkipString/SkipBytes, OCF skipToEnd/readBlock byte sizing, and Reader.ReadNext union-index selection used by the generic Unmarshal-into-any/map path) require the target to be compiled for a 32-bit GOARCH (386, arm, mips, wasm); the typed-codec union decoder in codec_union.go is not affected because ReadInt returns int32 directly. Exploitation does not require any non-default Config values; setting Config.MaxByteSliceSize lower does not block the 32-bit narrowing paths because narrowing occurs before the limit check.

Impact

The CVSS 4.0 vector AV:N/AC:L/AT:N/PR:N/UI:N with VA:H and VC:N/VI:N (score 8.7) accurately reflects a network-reachable, low-complexity, unauthenticated denial-of-service with no confidentiality or integrity impact, which matches the advisory's explicit statement that 'no primitives reach beyond denial-of-service on current code paths.' KEV status is not indicated and no EPSS score was supplied in the input, so widespread automated exploitation cannot be confirmed; the realistic threat model is targeted DoS against any Go service that deserializes Avro from untrusted sources (Kafka consumers, schema-registry workflows, file ingestion pipelines). One important caveat the analyst should not overlook: the advisory flags the union-index narrowing in Reader.ReadNext as a 'worst-case' wrong-branch selection that on 32-bit builds could parse downstream bytes against the wrong schema and yield semantically wrong but well-typed values - a potential integrity concern the CVSS VI:N does not capture and which defenders running on 32-bit targets should weigh independently. The advisory itself supplies five concrete PoC input shapes, which materially lowers the barrier to weaponization even though no off-the-shelf exploit is published.

Exploit ScenarioDerived

An attacker who can deliver an Avro-encoded message to a vulnerable Go service - for example a Kafka topic consumer, a schema-registry-fronted API, or an OCF file ingestion job - sends a crafted payload such as an array spanning two blocks where the second block declares math.MaxInt − 2 elements, or an OCF block whose wire-format size is negative. The cumulative size addition wraps to math.MinInt and bypasses MaxSliceAllocSize, or make([]byte, size) is invoked with a negative length, panicking the goroutine and disrupting the consumer; the advisory publishes the exact PoC input shapes and ships a regression test (TestDecoder_ArrayMultiBlockExceedsMaxInt) that reproduces the amd64 path.

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

Denial-of-service in the iskorotkov/avro Go Avro decoder (a maintained fork of the archived hamba/avro) lets unauthenticated remote attackers crash or hang consumers by submitting crafted Avro streams that trigger integer narrowing, signed-integer overflow in cumulative block sizes, or unchecked-negative make() calls. All versions prior to v2.33.0 are affected; the upstream github.com/hamba/avro/v2 (all versions through v2.31.0) is also vulnerable and will not receive a fix because the module is archived. No public exploit identified at time of analysis, though the advisory itself documents concrete PoC input shapes and includes a regression test (TestDecoder_ArrayMultiBlockExceedsMaxInt) that demonstrates the cumulative-overflow path on amd64.

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

Denial-of-service via integer overflow in the iskorotkov/avro Go Avro decoder (versions prior to v2.33.0, fork of the archived hamba/avro/v2) allows remote unauthenticated attackers to crash decoding processes by submitting crafted Avro streams. Several decoder paths narrow attacker-controlled 64-bit wire values to platform-sized int before bounds checks (32-bit builds) and sum block lengths with overflow-prone signed-int arithmetic on all platforms, bypassing MaxSliceAllocSize/MaxByteSliceSize/MaxMapAllocSize caps and triggering panics via negative make() or math.MinInt negation. No public exploit identified at time of analysis, but a regression test (TestDecoder_ArrayMultiBlockExceedsMaxInt) demonstrates the amd64/arm64 cumulative-overflow path.

v1 May 18, 2026 - 17:00 CVSS 7.5

Denial-of-service in the iskorotkov/avro Go Avro decoder (and its upstream hamba/avro v2 ancestor) allows remote unauthenticated attackers to crash decoding processes or bypass slice/map allocation caps by submitting crafted Avro streams whose 64-bit wire values trigger integer truncation, signed-int cumulative overflow, or negative-size make() panics. CVSS 7.5 (AV:N/AC:L/PR:N/UI:N/A:H) reflects pure availability impact; no public exploit identified at time of analysis, though the advisory itself documents detailed proof-of-concept inputs and a regression test demonstrating cap bypass on amd64.

RemediationAI

Vendor-released patch: github.com/iskorotkov/avro/v2 v2.33.0 (release https://github.com/iskorotkov/avro/releases/tag/v2.33.0, fix commits bed99b3 and e1a570f via PRs #9 and #10). Consumers currently on github.com/hamba/avro/v2 must migrate the import path to github.com/iskorotkov/avro/v2 v2.33.0 or later and run go mod tidy, since the hamba module is archived and no upstream fix exists; teams that need to preserve the existing import path can add a replace directive (replace github.com/hamba/avro/v2 => github.com/iskorotkov/avro/v2 v2.33.0) to go.mod, but note that Go honors replace only for the main module of a build, so transitive consumers must add their own replace or migrate directly. If you cannot upgrade immediately, do not decode untrusted Avro data on any platform - lowering Config.MaxByteSliceSize is not a valid workaround because narrowing happens before the limit comparison, and the cumulative-overflow paths in array/map decoders are reachable on amd64/arm64. As a containment-only measure for the math.MinInt negation and OCF negative-make panic paths, wrap Decode and OCF read calls in a goroutine with defer recover() to bound crashes, but this does nothing for the other narrowing paths that return errors rather than panicking; isolate decoding workers so a panic does not take down the parent process. The full advisory at https://github.com/iskorotkov/avro/security/advisories/GHSA-mc57-h6j3-3hmv documents the full remediation.

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

The vulnerability sits in the Avro binary wire-format decoder for a Go library that implements the Apache Avro serialization standard. Avro encodes block counts and length-prefixed strings/bytes as zig-zag signed longs (int64), but six decoder call sites in reader.go, reader_skip.go, codec_array.go, codec_map.go, reader_generic.go, and ocf/ocf.go converted those int64 wire values to platform-sized int before performing bounds checks against Config.MaxByteSliceSize, MaxSliceAllocSize, and MaxMapAllocSize. The root-cause class is CWE-190 Integer Overflow or Wraparound (with CWE-191 signed-integer underflow via -math.MinInt negation in ReadBlockHeader and CWE-1284 unchecked-negative input in ocf readBlock as sub-issues). On 32-bit GOARCH targets (386, arm, mips, wasm) narrowing int64 → int32 silently drops the high bits so the limit comparison sees the truncated value, while cumulative size += int(l) in arrayDecoder/mapDecoder wraps on amd64/arm64 at math.MaxInt64 and produces a negative running total that trivially passes the > limit guard. The fix pattern keeps values in int64-typed locals, range-checks against Min/MaxInt32 (or Min/MaxInt) before any narrowing, and uses subtraction-safe comparisons (l > limit - size).

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:29 vuln.today
v3 - CVSS changed
Analysis Updated
May 29, 2026 - 20:29 vuln.today
v2 - CVSS changed
CVSS changed
May 29, 2026 - 20:22 NVD
7.5 (HIGH) 8.7 (HIGH)

DescriptionCVE.org

Integer Overflow in Avro Decoder

Summary

Several Avro decoder paths read attacker-controlled 64-bit values from the wire format and either narrowed them to platform-sized int before bounds-checking, or summed them with overflow-prone signed-int arithmetic. On 32-bit targets (GOARCH=386, arm, mips, wasm, etc.), the truncation paths can silently bypass byte-slice limits, select the wrong union branch, or hit the OCF negative-make panic via wrap. Three sub-issues are not 32-bit-specific: cumulative-size arithmetic overflow in arrayDecoder.Decode / mapDecoder.Decode / mapDecoderUnmarshaler.Decode (wraps at math.MaxInt64 on amd64 / arm64 and bypasses MaxSliceAllocSize / MaxMapAllocSize), math.MinInt negation in block-header handling, and make([]byte, size) with a negative size in OCF block reads - all three panic or bypass caps on any platform, giving an attacker a denial-of-service primitive there.

Exploitation requires only an untrusted Avro stream. No primitives reach beyond denial-of-service on current code paths; see the union-index discussion below for a caveat.

Description

Six call sites in the decoder accepted int64 values from the Avro wire format and converted to int before validation. On a 32-bit build any wire value with magnitude ≥ 2³¹ truncates and the post-conversion value bears no useful relationship to the original. A value of (1<<32) + 5 narrows to 5; 1<<32 narrows to 0; values just past MaxInt32 narrow to large negatives.

This is distinct from the existing Config.MaxSliceAllocSize, Config.MaxByteSliceSize, and the new Config.MaxMapAllocSize limits, because narrowing happens *before* the limit comparison - the limit sees the truncated value, not the original wire value, so the cap is bypassed.

Three further sub-issues are not 32-bit-specific:

  • arrayDecoder.Decode, mapDecoder.Decode, and mapDecoderUnmarshaler.Decode summed attacker-controlled block lengths via size += int(l) and then checked size > limit. On amd64 / arm64 the running total wraps at math.MaxInt64; the post-wrap negative value passes the > limit check, and the decoder proceeds. Regression test: TestDecoder_ArrayMultiBlockExceedsMaxInt uses math.MaxInt − 2 for the second block's count and a MaxSliceAllocSize of 13 to demonstrate this on amd64. The Avro block-count field is a signed long on the wire, so block counts up to math.MaxInt64 are admissible - there is no implicit 2³¹ ceiling.
  • ReadBlockHeader() returns the absolute value of negative block lengths; the negation is unsafe for math.MinInt, which on every platform panics on overflow.
  • ocf/ocf.go readBlock() passes the decoded block size directly to make([]byte, size). A negative wire value panics on every platform; on 32-bit, values > MaxInt32 additionally panic via the narrowing path.

Affected components

FileFunction(s)Bug classPlatforms
reader.goReadBlockHeader - narrowingNarrowing32-bit
reader.goReadBlockHeader - -math.MinIntSigned overflow (CWE-191)all
reader.goreadBytes (via Reader.ReadBytes, Reader.ReadString)Narrowing32-bit
reader_skip.goSkipString, SkipBytes (and OCF skip path)Narrowing32-bit
codec_array.goarrayDecoder.DecodeCumulative-size arithmetic overflow (CWE-190)all
codec_map.gomapDecoder.Decode, mapDecoderUnmarshaler.DecodeCumulative-size arithmetic overflow (CWE-190)all
ocf/ocf.goskipToEnd, readBlock - narrowingNarrowing32-bit
ocf/ocf.goreadBlock - negative make([]byte, …)Unchecked-negative (CWE-1284)all
reader_generic.gounion-type index decoding in Reader.ReadNextNarrowing, possible wrong-branch selection32-bit

PR #9 (commit bed99b3) covered ReadBlockHeader, the cumulative checks in array/map codecs, and the skip helpers. The completeness pass (commit e1a570f) covered the union index, readBytes, and OCF readBlock, and added a 32-bit CI job.

Note: the typed-codec union decoder in codec_union.go (getUnionSchema → Reader.ReadInt) is not affected by the union-index narrowing - ReadInt returns int32, no narrowing occurs. The narrowing is specific to Reader.ReadNext in the generic decode path (reached via Unmarshal into any / map[string]any).

Technical details

  1. Block-header narrowing and MinInt negation. ReadBlockHeader() returned wire-format int64 values through narrower operations; on 32-bit, large positives truncated. Negating math.MinInt to convert a negative block-count signal into a positive size is undefined-on-overflow, and on every platform -MinInt panics on overflow when used in subsequent arithmetic. The fix reads into a *64-suffixed local, range-checks against MinInt32/MaxInt32 (or MinInt/MaxInt as appropriate), and narrows after validation.
  2. Cumulative array and map size overflow (all platforms). arrayDecoder.Decode, mapDecoder.Decode, and mapDecoderUnmarshaler.Decode summed attacker-controlled block lengths using overflow-prone addition; cumulative size could wrap before reaching the configured limit. On amd64 with MaxSliceAllocSize = 13, block 1 of 3 elements, block 2 of math.MaxInt − 2 elements: the pre-fix size += int(l) wraps to math.MinInt, then MinInt > 13 is false, so the check passes and the decoder proceeds. The fix uses subtraction-safe comparisons (l > limit - size rather than size + l > limit), which is overflow-immune.
  3. Skip-length truncation. SkipString, SkipBytes, and the OCF skip helper now route through SkipNBytesInt64(), which keeps the length as int64 and range-checks before any narrowing.
  4. Byte-slice length truncation. A wire-format length such as (1<<32) + 5 truncated to 5 in readBytes(), slipping past Config.MaxByteSliceSize on 32-bit. The fix reads the length as int64, compares against MaxByteSliceSize before narrowing, and returns "value is too big" if exceeded.
  5. Union index narrowing (generic decode path only). Reader.ReadNext decoded the union index as int64 and immediately cast to int. On 32-bit, 1<<32 narrowed to 0 and silently selected types[0] despite the explicit upper-bound check immediately above. If types[0] is the null branch (idiomatic for ["null", T] nullable unions), the practical result is a null value where the producer encoded a non-null payload - a DoS-grade logic error. If types[0] is a non-trivial schema, downstream bytes are parsed against the wrong schema and produce well-typed but semantically wrong values; treat this as the worst-case interpretation when assessing impact on your own deployment. The typed-codec union decoder (codec_union.go getUnionSchema → Reader.ReadInt) is not affected.
  6. OCF block-size narrowing and negative make. readBlock() passes the decoded int64 size directly to make([]byte, size). A negative wire value panics on every platform; a value > MaxInt32 additionally panics via the 32-bit narrowing path. The fix validates the size is in [0, MaxByteSliceSize] before narrowing.

Fixed behavior

Both commits apply the same pattern across every site:

  1. Read the wire value into an int64-typed local.
  2. Range-check upper and lower bounds before narrowing.
  3. Compare cumulative limits using subtraction-safe arithmetic.
  4. Route skip operations through SkipNBytesInt64().
  5. Return descriptive errors using the consistent "value is too big" / "value is too small" wording.
  6. Cast to int only after validation succeeds.

CI: a test-386 job runs the suite under GOARCH=386 with CGO_ENABLED=0 (-race is amd64/arm64-only). Three tests with untyped 2147483648 constants whose t.Skipf gates fire too late (the file fails to compile before any test runs) were split into sibling *_64bit_test.go files gated by //go:build amd64 || arm64 || ....

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. The packages share the same API surface; replace the import path and run go mod tidy:

diff
- import "github.com/hamba/avro/v2"
+ import "github.com/iskorotkov/avro/v2"

For consumers that prefer the original import path, a replace directive in go.mod is supported:

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.

No further configuration is required to benefit from the integer-narrowing fixes - the validation runs on the existing decode path.

If you cannot upgrade immediately:

  • Do not decode untrusted Avro data on any platform - the cumulative-arithmetic overflow paths (arrayDecoder.Decode, mapDecoder.Decode, mapDecoderUnmarshaler.Decode) are reachable on amd64 / arm64. The truncation paths on 32-bit cannot be mitigated by setting Config.MaxByteSliceSize lower, because the truncated post-narrowing value is what the limit sees, not the original wire value.
  • For the cross-platform math.MinInt and OCF negative-size panic paths, wrapping Decode / OCF read calls in a goroutine with defer recover() contains the crash, but is not a substitute for upgrading. The other narrowing paths return errors rather than panicking, so recover() does nothing for them.
  • Isolate decoding workers so a crash is bounded.

Proof-of-concept inputs

  • A bytes or string length of (1<<32) + N for small N, which narrows to N on 32-bit and bypasses Config.MaxByteSliceSize.
  • A union index of 1<<32, which narrows to 0 on 32-bit and selects types[0] despite the upper-bound check.
  • An array or map encoded across multiple blocks whose cumulative element count wraps the signed int running total before the limit check fires. Demonstrated on amd64 by TestDecoder_ArrayMultiBlockExceedsMaxInt: MaxSliceAllocSize = 13, block 1 of 3, block 2 of math.MaxInt − 2. Wraps to math.MinInt, check passes, decoder proceeds.
  • A block header whose absolute value is math.MinInt, triggering the unsafe negation (cross-platform).
  • An OCF block size that is negative on the wire, causing make([]byte, size) to panic (cross-platform); or a positive value > MaxInt32 on 32-bit, same outcome via narrowing.

References

Credits

  • Discovery and initial fixes (PR #9, commit bed99b3 - ReadBlockHeader, cumulative array/map checks, skip helpers): Daniel Błażewicz (@klajok)
  • Completeness fixes (commit e1a570f - union index, readBytes, OCF readBlock, 32-bit CI coverage): Ivan Korotkov (@iskorotkov)

Timeline

  • 2026-05-04 - Initial integer-overflow hardening (PR #9, bed99b3) merged.
  • 2026-05-04 - Completeness pass (e1a570f) merged; 32-bit CI job added.
  • 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 high-severity denial-of-service vulnerability (CVE-2026-46384, CVSS 8.7) allowing unauthenticated remote attackers to crash message consumers through crafted Avro streams. Organizations using this library face potential service disruption; those relying on the archived upstream hamba/avro lack any vendor remediation path. Immediate patching is critical to prevent Avro stream-based availability attacks.

Business Impact: High
Compensating Controls

Apply vendor patch: iskorotkov/avro v2.33.0 or later. For archived hamba/avro users: implement input validation, rate limiting, and timeout controls on Avro stream deserialization; prioritize migration to maintained fork.

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

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

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