CVE-2026-59406: In Spring for Apache Kafka, denial of service via memory-allocating types in header mapper default trusted packages

Published Dec 2, 2026
·
Updated

When mapping inbound record headers, JsonKafkaHeaderMapper and DefaultKafkaHeaderMapper (used by the default message converters) deserialize each header value into the type named for it in the producer-controlled springjsonheadertypes header, provided that type's package is trusted. Because org.springframework.util is trusted by default, a producer can declare org.springframework.util.ResizableByteArrayOutputStream and supply a number as the header value, causing the consumer to allocate a buffer of that size while mapping the header.

With Jackson 3, a single header with a large value raises an OutOfMemoryError that is not caught by the mapper, so the listener container stops before the record is committed, and stops again on the same record after a restart. With Jackson 2, a single record carrying many such headers can exhaust the heap with the same result. In both cases, a small record is enough for a malicious producer to repeatedly stop consumption and put memory pressure on the whole application.

An application is affected if it consumes records from a topic that an attacker can produce to and maps headers with JsonKafkaHeaderMapper or DefaultKafkaHeaderMapper , which is the default for @KafkaListener methods and other listeners using the messaging message converters.

Affected Software

1 affected component
maven/org.springframework.kafka/spring-kafka

Event History

Dec 2, 2026
CVE Published
via MITRE·07:11 AM
Data Sourced
via MITRE·07:11 AM
DescriptionSeverity

Frequently Asked Questions

1

Which applications are exposed to this issue?

An application is affected when it consumes from a topic to which an attacker can produce records and maps record headers using JsonKafkaHeaderMapper or DefaultKafkaHeaderMapper. These mappers are used by the default message converters.

2

Does the default trusted-package configuration permit exploitation?

Yes. The org.springframework.util package is trusted by default, allowing a producer to specify org.springframework.util.ResizableByteArrayOutputStream in the producer-controlled spring_json_header_types header.

3

What level of access does an attacker need?

The attacker needs the ability to produce records to a topic consumed by the vulnerable application. No user interaction is required.

4

How does the denial of service differ between Jackson 2 and Jackson 3?

With Jackson 3, one header carrying a large numeric value can cause an uncaught OutOfMemoryError. With Jackson 2, a single record containing many such headers can exhaust heap memory; in either case, the listener can repeatedly stop on the same uncommitted record after restart.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203