MODERATE

CVE-2026-59395

Spring AMQP Publisher-Controlled Headers Overwrite Framework-Derived amqp_* Headers

Description

SimpleAmqpHeaderMapper.toHeaders() first populates the Spring Messaging headers with framework-derived values from the received MessageProperties (such as amqp_receivedUserId, amqp_consumerQueue, amqp_deliveryTag and amqp_redelivered) 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.RECEIVED_USER_ID (broker-validated identity) or AmqpHeaders.CONSUMER_QUEUE, for authorization or routing decisions.

Affected Maven artifacts (1)

ArtifactAffected versionsFixed in
org.springframework.amqp » spring-amqp
<= 2.4.19>= 3.2.0, <= 3.2.13>= 4.0.0, < 4.0.7>= 4.1.0, < 4.1.3
4.0.7, 4.1.3

Blast radius

1affected artifacts
222affected versions
1,622dependent artifacts (est.)
26,188dependent versions

66% of the dependent artifacts (1,085) still pull an affected version in their latest release.

DepthDependent versions
Direct
1,036
2 hops
4,244
3 hops
8,094
4 hops
7,265
5 hops
4,016
6 hops
1,533

Most used dependents

Computed from the dependency graph of build 20261125.0317 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.