CVE-2026-59395

Authorization Bypass
Affects
Spring AMQP
in
Spring
No items found.
Versions
>=4.1.0 <=4.1.2, >=4.0.0 <=4.0.6, >=3.2.0 <=3.2.13, <=2.4.19

Patch Available.

Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

Spring AMQP applies core Spring concepts to the development of AMQP-based messaging solutions, providing a template for sending and receiving messages and listener containers that deliver messages to annotated @RabbitListener methods.

An authorization bypass vulnerability (CVE-2026-59395) has been identified in the SimpleAmqpHeaderMapper of Spring AMQP, which allows attackers who can publish messages to a listener's queue to replace trusted framework headers such as amqp_receivedUserId and amqp_consumerQueue with values of their choosing. Applications that use these headers for authorization or routing decisions can be misled into treating a message as coming from another user or queue.

Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.

This issue affects multiple versions of Spring AMQP.

Details

Module Info

Vulnerability Info

This Medium-severity vulnerability is found in the org.springframework.amqp:spring-amqp package in multiple versions of Spring AMQP.

When a listener receives a message, SimpleAmqpHeaderMapper.toHeaders() converts the AMQP MessageProperties into Spring Messaging headers. It first fills the header map with framework-derived values taken from the MessageProperties getters, such as amqp_receivedUserId (the broker-validated user id), amqp_consumerQueue, amqp_deliveryTag and amqp_redelivered. It then copies the raw AMQP headers table of the message on top of that map without any filtering:

.acceptIfHasText(AmqpHeaders.RECEIVED_USER_ID, amqpMessageProperties.getReceivedUserId(),
        putString)
.acceptIfHasText(AmqpHeaders.CONSUMER_TAG, amqpMessageProperties.getConsumerTag(), putString)
.acceptIfHasText(AmqpHeaders.CONSUMER_QUEUE, amqpMessageProperties.getConsumerQueue(), putString);
headers.put(AmqpHeaders.LAST_IN_BATCH, amqpMessageProperties.isLastInBatch());
headers.put(AmqpHeaders.RETRY_COUNT, amqpMessageProperties.getRetryCount());

// Map custom headers
headers.putAll(amqpMessageProperties.getHeaders());

Older lines perform the same unfiltered copy with a loop that calls headers.put(entry.getKey(), entry.getValue()) for every entry of amqpMessageProperties.getHeaders().

The AMQP headers table is fully controlled by the publisher. A publisher can therefore add custom headers whose names collide with the AmqpHeaders constants, for example amqp_receivedUserId or amqp_consumerQueue. Because the custom headers are copied last, these values silently replace the framework-derived ones, or inject them when the corresponding property was absent. A @RabbitListener handler that reads @Header(AmqpHeaders.RECEIVED_USER_ID) or inspects MessageHeaders then sees the attacker-supplied value instead of the identity validated by the broker or the queue the message was actually consumed from, which can defeat authorization or routing decisions based on those headers.

Mitigation

Only recent versions of Spring AMQP receive community support. Older lines are End-of-Life and will not receive public updates to address this issue.

Users of the affected components should apply one of the following mitigations:

  • Upgrade to a currently supported version of Spring AMQP.
  • Leverage a commercial support partner like HeroDevs for post-EOL security support.
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
ID
CVE-2026-59395
PROJECT Affected
Spring AMQP
Versions Affected
>=4.1.0 <=4.1.2, >=4.0.0 <=4.0.6, >=3.2.0 <=3.2.13, <=2.4.19
NES Versions Affected
Published date
November 20, 2026
≈ Fix date
Category
Authorization Bypass
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for Spring
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.