CVE-2026-77406
ADVISORY - githubSummary
Summary
A logic and resource exhaustion vulnerability exists in the AMQP client's Quality of Service (Qos) configuration method. The Qos function accepts signed integers (int) for the prefetchCount and prefetchSize parameters but casts them directly to unsigned integers (uint16 and uint32, respectively) when formatting the wire-level frame.
If a developer passes a negative integer (such as -1) to these parameters—frequently intended as a sentinel value meaning "no change" or "no limit"—the application performs an implicit signed-to-unsigned conversion. This wraps the values to their absolute maximum limit ($65535$ and $4294967295$). Consequently, a consumer expecting restricted message delivery rates is suddenly flooded with an unlimited volume of messages, potentially exhausting memory resources and crashing the application.
Vulnerability Details
Mechanism
The bug manifests during the structural assignment inside the channel's Qos method:
// channel.go:795-796
PrefetchCount: uint16(prefetchCount), // -1 wraps to 65535
PrefetchSize: uint32(prefetchSize), // -1 wraps to 4294967295
In Go, converting a negative signed integer to an unsigned integer shifts the value via two's complement arithmetic. Because no boundary validation or signedness check occurs prior to the cast:
- Passing
-1forprefetchCountyields a wire value of65535. - Passing
-1forprefetchSizeyields a wire value of4294967295.
Impact
The AMQP broker interprets a prefetch-count of 65535 as an instruction to dispatch messages to the consumer with virtually no concurrency limits.
If the application is processing heavy payloads or relies on strict rate-limiting to maintain stability, this unexpected flood will cause rapid heap memory growth, unmanageable processing queues, and an eventual Out-Of-Memory (OOM) termination.
Attack Vector
An attacker who can manipulate configuration files, environmental variables, or API inputs that dictate client Qos settings can trigger an application-layer Denial of Service:
- Malicious Input: An attacker sets a service's prefetch configuration parameter to
-1. - Implicit Overflow: The application initializes the channel, executes
Qos(-1, ...), and transmits an unintended maximum-capacity request to the RabbitMQ/AMQP broker. - Consumer Exhaustion: The broker flushes the entire contents of the queue directly into the client consumer's network buffer, bypassing expected application concurrency barriers and inducing a crash.
Common Weakness Enumeration (CWE)
Signed to Unsigned Conversion Error
Signed to Unsigned Conversion Error
Integer Overflow or Wraparound
NIST
-
CVSS SCORE
8.2highGitHub
-
CVSS SCORE
8.2highDebian
-
Red Hat
3.9
CVSS SCORE
7.5highminimos
MINI-222w-m367-74w8
-
minimos
MINI-22gf-66xp-2hm2
-
minimos
MINI-29pp-xf75-8mcf
-
minimos
MINI-2gq5-x492-x8wp
-
minimos
MINI-3jg9-g22v-x83c
-
minimos
MINI-44xh-f664-ccq3
-
minimos
MINI-5pmv-cjq9-5phc
-
minimos
MINI-6v82-4g8m-m2xv
-
minimos
MINI-7c7f-3q2r-hvvj
-
minimos
MINI-7gfc-2p55-cp98
-
minimos
MINI-c456-8jq2-wqqh
-
minimos
MINI-cx7w-33hw-53ch
-
minimos
MINI-fmpj-v7mr-8wgr
-
minimos
MINI-gc9m-3r94-gwrm
-
minimos
MINI-jjjp-86w3-2mrj
-
minimos
MINI-m89f-ww7v-8vfc
-
minimos
MINI-q328-fvjx-5h7p
-
minimos
MINI-q3w4-92w7-29fm
-
minimos
MINI-q84f-f9fx-qwmm
-
minimos
MINI-r7mv-vvph-487f
-
minimos
MINI-rqmp-v8pv-945j
-
minimos
MINI-v838-hprf-988h
-
minimos
MINI-wj72-hh9j-2vrm
-