CVE-2026-59395: Spring AMQP Publisher-Controlled Headers Overwrite Framework-Derived amqp_* Headers
SimpleAmqpHeaderMapper.toHeaders() first populates the Spring Messaging headers with framework-derived values from the received MessageProperties (such as amqpreceivedUserId , amqpconsumerQueue , amqpdeliveryTag and amqpredelivered ) and then copies the raw AMQP message headers, which are fully controlled by the publisher. As a result, a publisher can supply custom headers whose names collide with the amqp constants and silently replace the trusted values that downstream @RabbitListener handlers see via @Header or MessageHeaders .
Applications are affected if an attacker is able to publish messages routed to a listener and the application relies on an amqp framework header, for example AmqpHeaders.RECEIVEDUSERID (broker-validated identity) or AmqpHeaders.CONSUMERQUEUE , for authorization or routing decisions.
Affected Software
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Applications are affected when an attacker can publish messages that are routed to a listener and the application uses an amqp_* framework-derived header for authorization or routing decisions. Examples include reliance on AmqpHeaders.RECEIVED_USER_ID or AmqpHeaders.CONSUMER_QUEUE.
What access does an attacker need to exploit it?
The attacker needs the ability to publish a message that reaches an affected listener. They can then provide raw AMQP headers with names that collide with amqp_* headers and replace the values visible to the listener.
What values can be spoofed for a listener?
Publisher-controlled headers can overwrite framework-derived values including amqp_receivedUserId, amqp_consumerQueue, amqp_deliveryTag, and amqp_redelivered. The downstream @RabbitListener handler may receive the attacker-supplied value through @Header or MessageHeaders.
How can teams determine whether their application is affected?
Review listener authorization and routing logic for use of amqp_* headers, especially values obtained through @Header or MessageHeaders. The application is at risk if those values influence decisions and untrusted publishers can route messages to the listener.