RabbitMQ amqp091-go: Consumer Message Flooding via Signed-to-Unsigned Integer Casting in Qos Configuration
Published 17 Sept 2026 · Updated 1 Oct 2026
Is your project on an affected github.com/rabbitmq/amqp091-go?
Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <1.13.0
- Fixed in
- 1.13.0
go get github.com/rabbitmq/amqp091-go@v1.13.0Details
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:
1. Malicious Input: An attacker sets a service's prefetch configuration parameter to -1.
2. Implicit Overflow: The application initializes the channel, executes Qos(-1, ...), and transmits an unintended maximum-capacity request to the RabbitMQ/AMQP broker.
3. 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.
Is GHSA-rm6m-hrcw-jw33 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/rabbitmq/amqp091-go, and gives you the command that fixes it.
More advisories for github.com/rabbitmq/amqp091-go
- LowCVE-2026-107386Pre-negotiation frame limit is not enforced to 4KB in github.com/rabbitmq/amqp091-go · 19 Oct 2026
- MediumCVE-2026-107386amqp091-go: Pre-negotiation frame limit is not enforced to 4KB · 8 Oct 2026
- LowCVE-2026-77407RabbitMQ amqp091-go: Plaintext Credential Exposure via Exported PLAIN Authentication Struct Fields in github.com/rabbitmq/amqp091-go · 1 Oct 2026
- LowCVE-2026-77405RabbitMQ amqp091-go: Missing Explicit TLS Minimum Version Configuration In URI Parser in github.com/rabbitmq/amqp091-go · 1 Oct 2026
- LowCVE-2026-77404RabbitMQ amqp091-go: Connection Configuration Overwrite via Unsanitized TLS Path Parameter Injection in github.com/rabbitmq/amqp091-go · 1 Oct 2026
- LowCVE-2026-77412RabbitMQ amqp091-go: Denial of Service via Malicious Field Length in AMQP Client in github.com/rabbitmq/amqp091-go · 1 Oct 2026
References
- Linkgithub.com/rabbitmq/amqp091-go/security/advisories/GHSA-rm6m-hrcw-jw33
- Advisorynvd.nist.gov/vuln/detail/CVE-2026-77406
- Linkgithub.com/rabbitmq/amqp091-go/pull/351
- Linkgithub.com/rabbitmq/amqp091-go/commit/3b879e1d1d25b544e26b3bc3d7db3213203c0f3b
- Packagegithub.com/rabbitmq/amqp091-go
- Linkgithub.com/rabbitmq/amqp091-go/releases/tag/v1.13.0
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.