RabbitMQ amqp091-go: Protocol Desynchronization and Frame Injection via Integer Overflow in readLongstr
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 critical stream desynchronization vulnerability has been identified in the AMQP wire-protocol parser. When parsing a long string (readLongstr) within a table field, providing a length that exceeds the maximum signed 32-bit integer (2^31 - 1, or roughly 2.1 GiB) triggers an improper error-handling condition. The parser abruptly aborts the read and returns a success status ("",nil) without consuming the specified bytes from the underlying network buffer. This causes all subsequent read operations to become misaligned. The parser interprets arbitrary offsets within the remaining payload bytes as valid AMQP frame headers, leading to potential Remote Code Execution (RCE), data injection, or complete connection hijacking.
Vulnerability Details
The vulnerability exists within the bounds-checking logic of the readLongstr function:
// read.go:113-114 — silent no-op return, bytes left in stream
if length > (^uint32(0) >> 1) {
return // returns "", nil, does NOT consume `length` bytes
}When length evaluates to a value greater than 0x7FFFFFFF:
1. The function executes a silent return statement.
2. Because Go utilizes named or zero-value initialization for unassigned return registers, this yields "", nil (indicating a successful read of an empty string).
3. The Critical Failure: The reader's cursor is not advanced by length bytes. The malformed payload remains sitting in the TCP/buffer stream.
Impact
As readTable continues iterating over the stream under the assumption that the string was successfully parsed, the byte alignment is entirely broken.
- Parser Desynchronization: Future AMQP frame headers are read from arbitrary offsets inside the attacker-controlled message payload.
- Payload Reinterpretation: A malicious actor can carefully craft the trailing bytes of the initial payload to perfectly mimic valid AMQP frames (e.g.,
connection.close,channel.open, or message publishing frames), forcing the client/server to execute unintended actions.
Is GHSA-c5pq-fr2g-9jpf 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-c5pq-fr2g-9jpf
- Advisorynvd.nist.gov/vuln/detail/CVE-2026-77411
- Linkgithub.com/rabbitmq/amqp091-go/pull/347
- Linkgithub.com/rabbitmq/amqp091-go/commit/143c1ace5fa7344cee135e5c7d22970f0de68282
- 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.