NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐹 Go
Not in CISA KEV

RabbitMQ amqp091-go: Silent Data Truncation and State Corruption via Shortstr Integer OverflowGHSA-j497-x9hr-x34x

Fix: rabbitmq/amqp091-go#354

GHSA-j497-x9hr-x34x is a CWE-190 vulnerability in github.com/rabbitmq/amqp091-go. A fix is available for github.com/rabbitmq/amqp091-go — see the affected versions and patch details below.

Also known asCVE-2026-77408GO-2026-6498
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 21, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-j497-x9hr-x34x.

EPSS Exploitation Probability

via FIRST.org ↗
0.5%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs45th percentile — riskier than 45% of all scored CVEsHighest risk
0.02%0.36%0.69%1.02%0.5%0.5%0.5%Oct 26Nov 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
🐹github.com/rabbitmq/amqp091-go

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/rabbitmq/amqp091-goall versions1.13.0go get github.com/rabbitmq/amqp091-go@v1.13.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/rabbitmq/amqp091-go, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/rabbitmq/amqp091-go to 1.13.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-j497-x9hr-x34x is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

A numeric truncation flaw was found in the RabbitMQ amqp091-go Go AMQP 0.9.1 client library. The writeShortstr function casts the byte length of AMQP shortstr property values to uint8 without first rejecting values exceeding 255 bytes. When an application publishes an AMQP message with an oversized CorrelationId,…

Workaround published by Red Hat
Ensure that AMQP shortstr property values (CorrelationId, ReplyTo, MessageId, Expiration, UserId, AppId, ContentType, ContentEncoding, Type) do not exceed 255 bytes before publishing messages. Applications that accept externally-supplied values for these fields should validate and reject oversized inputs at the application boundary. Upgrade to a patched version which returns an error in case length >= 255. Fix diff: https://github.com/rabbitmq/amqp091-go/commit/6959423aa2784a1971e399175dfb2065dea0f3b0 ```go func writeShortstr(w io.Writer, s string) (err error) { b := []byte(s) if len(b) > 255 { return fmt.Errorf("amqp: shortstr %q exceeds 255 bytes", s) } ```
Source: Red Hat security advisory for GHSA-j497-x9hr-x34x (CC BY 4.0)

Frequently Asked Questions

## 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 a
O3 Security · Impact-Aware SCA

Is GHSA-j497-x9hr-x34x in your dependencies?

Find it across Go, including transitive dependencies.

RabbitMQ amqp091-go: Silent Data Truncation and State…