Resource Exhaustion in RabbitMQ amqp091-go via Unsafe Integer Casting
The RabbitMQ amqp091-go library contains a vulnerability in its Qos configuration method where signed integer inputs are implicitly cast to unsigned integers, allowing attackers to trigger message flooding and OOM crashes via integer wrap-around.
CVE search metadata
CVE search record: CVE-2026-77406. KEV: no. Product: amqp091-go (< 1.13.0). Brief: Resource Exhaustion in RabbitMQ amqp091-go via Unsafe Integer Casting. Brief link: https://feed.craftedsignal.io/briefs/2026-09-rabbitmq-qos-vulnerability/
A resource exhaustion vulnerability (CVE-2026-77406) exists in the amqp091-go Go client library for RabbitMQ in versions prior to 1.13.0. The vulnerability stems from an unsafe signed-to-unsigned integer cast within the Qos configuration method. When a developer provides a negative integer (such as -1) as a sentinel value for prefetchCount or prefetchSize, the Go runtime uses two's complement arithmetic to cast the input to an unsigned uint16 or uint32.
This cast wraps the value to its maximum limit (65535 or 4,294,967,295, respectively). If an attacker can influence the configuration inputs of a service using this library, they can force the client to request an unlimited volume of messages from the broker. This overrides intended application-level rate limiting, causing rapid heap memory growth and potential Out-Of-Memory (OOM) termination of the consumer service.
Attack Chain
- An attacker identifies a service that utilizes the
amqp091-golibrary for message consumption. - The attacker gains access to modify application configuration files, environment variables, or specific API parameters that control the client's
Qossettings. - The attacker sets the
prefetchCountorprefetchSizeparameter to -1. - The application logic initializes the AMQP channel and calls
Qoswith the attacker-controlled input. - The library executes a silent implicit cast from
inttouint(e.g.,uint16(-1)becomes65535). - The client sends a frame to the RabbitMQ broker requesting an effectively unlimited message delivery rate.
- The broker flushes queued messages into the client's network buffer, bypassing concurrency limits.
- The consumer application experiences a spike in heap memory usage and crashes due to OOM.
Impact
Successful exploitation results in an application-layer Denial of Service (DoS) for the targeted service. By inducing an OOM condition, attackers can disrupt message processing workflows, potentially leading to service unavailability and operational impact. This vulnerability affects any environment relying on amqp091-go for high-throughput message processing.
Recommendation
- Upgrade the
amqp091-godependency to version 1.13.0 or later immediately to incorporate input validation that prevents unsafe casting. - Perform an audit of application codebases that implement the
Qosmethod to ensure no user-provided input or configuration values can supply negative integers to these parameters. - Implement strict input validation or sanitization layers before passing configuration data to library methods.
Immediate actions
Upgrade amqp091-go to v1.13.0 or later
Mitigations
Review code paths for Qos configuration for negative integer input
CVE-2026-77406