Vulnerability GHSA-j497-x9hr-x34x
Summary
RabbitMQ amqp091-go: Silent Data Truncation and State Corruption via Shortstr Integer Overflow
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.
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:
- Targeting RPC Routing: A user passes a malicious or overly long
CorrelationIdof 300 bytes through an application endpoint. - Silent Truncation: The library wraps the length value to 44, transmitting only the first 44 bytes to the rabbitMQ broker.
- 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.
Related Vulnerabilities
Other vulnerabilities affecting the same packages