Summary
A flaw in the recvContent function allows a malicious AMQP server to trigger an Out-of-Memory (OOM) error, forcing the host operating system or container runtime to immediately terminate the client process.
Vulnerability Details
When receiving message content payloads, the client processes the expected size from the content header framework. The recvContent function attempts to optimize performance by pre-allocating memory for the message body based on the ch.header.Size field, which is a 64-bit unsigned integer (uint64).
// channel.go:495-496
if cap(ch.body) == 0 {
ch.body = make([]byte, 0, ch.header.Size) // unbounded
}
The underlying library fails to validate or cap this requested size against any upper boundary—such as the maximum frame size negotiated during connection establishment (FrameMax). If a server specifies an extreme body size (e.g., 2^62 bytes), the Go runtime attempts to allocate an exabyte-scale slice capacity. This immediately exhausts available system memory, causing the operating system's OOM killer to terminate the application.
Attack Vector / Exploitation Scenario
basic.deliver frame containing a content header with an intentionally inflated body-size variable.Impact
{
"cwe_ids": [
"CWE-789"
],
"github_reviewed": true,
"github_reviewed_at": "2026-09-17T17:04:20Z",
"nvd_published_at": "2026-09-16T15:17:50Z",
"severity": "HIGH"
}