CVE-2026-59404
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring AMQP is the Spring project that provides support for using Spring and Java with AMQP 0.9.1, and in particular RabbitMQ, offering templates for sending and receiving messages and listener containers for message-driven consumers.
A denial of service vulnerability (CVE-2026-59404) has been identified in the message header conversion of Spring AMQP's spring-rabbit module, which allows attackers who can publish to a consumed queue to crash the consumer thread with a single message carrying deeply nested headers. If the broker redelivers the unacknowledged message, the listener container can enter a crash loop.
Per OWASP: The Denial of Service (DoS) attack is focused on making a resource (site, application, server) unavailable for the purpose it was designed.
This issue affects multiple versions of Spring AMQP.
Details
Module Info
- Product: Spring AMQP
- Affected packages:
org.springframework.amqp:spring-rabbit - Affected versions: <=2.4.19, >=3.0.0 <=3.2.13, >=4.0.0 <=4.0.6, >=4.1.0 <=4.1.2
- GitHub repository: https://github.com/spring-projects/spring-amqp
- Published packages: https://central.sonatype.com/artifact/org.springframework.amqp/spring-rabbit
- Package manager: Maven
- Fixed in:
- OSS Spring AMQP 4.0.7, 4.1.3
- NES for Spring AMQP
Vulnerability Info
This Medium-severity vulnerability is found in the org.springframework.amqp:spring-rabbit package in multiple versions of Spring AMQP.
When a message is received, DefaultMessagePropertiesConverter.toMessageProperties() converts every AMQP header value with convertLongStringIfNecessary(), which turns LongString instances into Java strings. AMQP 0-9-1 field-arrays and field-tables arrive as List and Map values and may nest arbitrarily, so the method walks them recursively, with one stack frame per level and no depth limit:
private Object convertLongStringIfNecessary(Object valueArg, String charset) {
if (valueArg instanceof LongString longStr) {
return convertLongString(longStr, charset);
}
if (valueArg instanceof List<?> values) {
List<Object> convertedList = new ArrayList<>(values.size());
values.forEach(value -> convertedList.add(this.convertLongStringIfNecessary(value, charset)));
return convertedList;
}
if (valueArg instanceof Map<?, ?> originalMap) {
Map<String, Object> convertedMap = new HashMap<>();
originalMap.forEach(
(key, value) -> convertedMap.put((String) key, this.convertLongStringIfNecessary(value, charset)));
return convertedMap;
}
return valueArg;
}An attacker who can publish to a queue consumed by a Spring AMQP listener container, or read with RabbitTemplate.receive(), can send a single message whose header contains thousands of nested field-arrays or field-tables, only a few tens of kilobytes on the wire. Converting that header exhausts the stack and throws a StackOverflowError on the consumer thread before any application code sees the message. Because the message is never acknowledged, the broker can redeliver it, and the container fails again on every delivery, so the consumer stops processing messages. Older lines express the same recursion with a loop over the list and map entries rather than lambdas, with the same unbounded depth.
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.