CriticalGHSA-j497-x9hr-x34xCVE-2026-77408GO-2026-6498

RabbitMQ amqp091-go: Silent Data Truncation and State Corruption via Shortstr Integer Overflow

Published 17 Sept 2026 · Updated 1 Oct 2026

Is your project on an affected github.com/rabbitmq/amqp091-go?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

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
Update to the fixed version for your release line, for example:go get github.com/rabbitmq/amqp091-go@v1.13.0

Details

Summary

A data integrity and protocol corruption vulnerability exists in the AMQP client's property serialization logic. When encoding AMQP short string (shortstr) fields—such as identifiers, routing strings, and content metadata—the length of the string is explicitly cast to a fixed-size 8-bit unsigned integer (uint8).

If an application provides a property string exceeding 255 bytes, the length counter silently wraps around (e.g., a length of 300 wraps to 44). As a result, the parser writes only a truncated portion of the string into the outgoing connection buffer without returning an error. This leads to silent data corruption, broken RPC routing, and unpredictable broker-side state behavior.

---

Vulnerability Details

Mechanism

The vulnerability resides in the wire-level serialization logic for application publishing properties:

// write.go:246
length := uint8(len(b))  // wraps silently when len(b) > 255 (e.g., 300 -> 44)

Because Go allows silent integer truncation during explicit type casting, lengths larger than $2^8 - 1$ lose their most significant bits. The underlying stream writer reads length to determine how many bytes to pull from the buffer. Because no error or boundary check accompanies this truncation, the application believes the full payload was transmitted successfully.

Affected Properties

This truncation behavior affects every standard AMQP field serialized as a shortstr:

  • CorrelationId
  • ReplyTo
  • MessageId
  • Expiration
  • UserId
  • AppId
  • ContentType
  • ContentEncoding
  • Type

Impact

The critical consequence is silent protocol desynchronization at the application layer. The underlying TCP stream remains framed properly (because the shortened length matches the bytes written), but the business logic is corrupted. Distributed transactions, request-reply correlations, and tracing headers are truncated, causing downstream systems to drop messages or route them to incorrect consumers.

---

Attack Vector

An attacker who can influence metadata fields processed by an upstream application (such as a user-supplied tracking ID or a long content-type header) can exploit this to break system components:

1. Targeting RPC Routing: A user passes a malicious or overly long CorrelationId of 300 bytes through an application endpoint. 2. Silent Truncation: The library wraps the length value to 44, transmitting only the first 44 bytes to the rabbitMQ broker. 3. Broken Correlation: When the service processes the request and responds, the replying consumer attempts to route the message using the full 300-byte identifier. Because the broker only recognizes the truncated 44-byte ID, the reply loop breaks silently, leading to hanging processes or data leaks across transaction boundaries.

Is GHSA-j497-x9hr-x34x 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
All 21 advisories for github.com/rabbitmq/amqp091-go

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.