CVE-2026-107386: amqp091-go: Pre-negotiation frame limit is not enforced to 4KB
The frame-size mitigation released in amqp091-go v1.13.0 can be bypassed before connection.tune completes. A malicious or compromised AMQP peer can send only a seven-byte body-frame header containing a large attacker-controlled uint32 payload length. The client allocates a slice of that declared length before it verifies that the payload exists or rejects the frame for its invalid protocol state.
The bypass occurs because Connection.maxFrameSize starts at zero. The reader interprets zero as both “negotiated unlimited” and “not negotiated yet,” and skips the pre-allocation size check in either case. Open starts the reader goroutine before negotiation and does not store a limit until after it receives connection.tune.
This remains reachable even if the caller explicitly uses Config{FrameSize: frameMinSize}. A malicious broker can therefore cause excessive memory allocation, potentially terminating the Go client process through memory exhaustion, before authentication and connection setup complete.
References
- github.com/advisories/GHSA-w6r9-248c-frg8
- github.com/rabbitmq/amqp091-go/commit/6723e8cff8710f0a6bf5fb4af375e285052535b3
- github.com/rabbitmq/amqp091-go/pull/377
- github.com/rabbitmq/amqp091-go/releases/tag/v1.14.0
- github.com/rabbitmq/amqp091-go/security/advisories/GHSA-w6r9-248c-frg8
- nvd.nist.gov/vuln/detail/CVE-2026-107386
Code Behaviors & Features
Detect and mitigate CVE-2026-107386 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →