Home › Vulnerabilities › Spring
Spring for Apache Kafka flaws let malicious producers trigger class loading and consumer crashes
NVD published four Spring for Apache Kafka vulnerabilities on 2 December 2026, rated medium or low. They share a theme: consumers trust type or class information supplied by the record producer, which can lead to unexpected deserialization, class loading and repeated stops of consumption.
What to look into
- 4 vulnerabilities in Spring for Apache Kafka: 3 medium, 1 low (CVSS up to 6.8).
- None of them is known to be exploited yet.
- Start with CVE-2026-59399 (6.8 medium): DelegatingDeserializer selects the delegate deserializer for each record from the spring.kafka.serialization.selector (value) or spring.kafka.key.serialization.selector (key) header. When the selecto… An attacker with a normal user account can exploit this over the network, without any user action, but only under specific conditions.
- 0 of 4 can be attacked over the network without logging in.
Key points
- CVE-2026-59399 (MEDIUM, CVSS 6.8) lets a producer choose deserialization and load arbitrary classes via DelegatingDeserializer
- CVE-2026-59432 and CVE-2026-59406 (MEDIUM, CVSS 6.5) can stop consumption with StackOverflowError or OutOfMemoryError from header mapping
- CVE-2026-59401 (LOW, CVSS 3.1) allows loading any classpath class through java.lang.Class header values
- Exposure depends on topics that untrusted producers can write to
- No fixed version or workaround is stated in the records
Overview
NVD published four Spring for Apache Kafka vulnerabilities on 2 December 2026. Three are rated MEDIUM and one is rated LOW. All four come from the same underlying problem: the consumer acts on type or class information that the record producer controls. None of the records states a fixed version, a workaround, or any observed exploitation.
DelegatingDeserializer
CVE-2026-59399 (MEDIUM, CVSS 6.8) affects DelegatingDeserializer. When the selector header matched no configured delegate, the class named in the header was loaded without restriction. For types such as String or Long, the record was decoded with the matching standard Kafka deserializer. According to the record, a malicious producer can therefore change the type listeners receive, make the consumer load any class on its classpath, and apply a configured delegate to data it was not meant for. The record says applications are affected when they use DelegatingDeserializer as a key or value deserializer on a topic an attacker can write to.
Header mapping type handling
JsonKafkaHeaderMapper and DefaultKafkaHeaderMapper deserialize header values into the types named in the springjsonheadertypes header, provided the type's package is trusted. Two MEDIUM (CVSS 6.5) records cover this path. CVE-2026-59432 describes deeply nested array types that cause a StackOverflowError on the consumer thread, and arrays of java.util.Timer that start a new thread per element. CVE-2026-59406 describes declaring org.springframework.util.ResizableByteArrayOutputStream with a large numeric value, which allocates a buffer of that size. The record says that with Jackson 3 a single header can raise an OutOfMemoryError, and with Jackson 2 many such headers can exhaust the heap. In both records the error 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.
Class loading through java.lang.Class
CVE-2026-59401 (LOW, CVSS 3.1) concerns the java.lang.Class type. Because java.lang is trusted by default, the type passes the trusted packages check. The class named in the value is then loaded without that check, and with some Jackson versions initialized. The record says the impact depends on the static initializers of classes on the classpath.
Scope and gaps
The CVE-2026-59401 record notes that header mapping with these mappers is the default when Jackson is on the classpath. The feed text for CVE-2026-59432 and CVE-2026-59406 is cut off, so their full affected-configuration details are not available here.
What to do
- Check whether applications use DelegatingDeserializer or JsonKafkaHeaderMapper or DefaultKafkaHeaderMapper, and whether they consume topics that untrusted producers can write to
- Restrict write access to topics consumed by affected applications to trusted producers
- Watch for a fixed release; the records do not name one
The 4 vulnerabilities
- CVE-2026-59399 6.8 DelegatingDeserializer selects the delegate deserializer for each record from the spring.kafka.serialization.selector (value) or spring.kafka.key.serialization.selector (key) header. When the selector matched no configured delegate, it loa…
- CVE-2026-59432 6.5 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 head…
- CVE-2026-59406 6.5 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 head…
- CVE-2026-59401 3.1 JsonKafkaHeaderMapper and the deprecated DefaultKafkaHeaderMapper check the header type requested in the springjsonheadertypes header against the mapper's trusted packages before deserializing a header value. Because java.lang is trusted b…
Frequently asked questions
How many Spring for Apache Kafka vulnerabilities were published on December 2, 2026?
4 vulnerabilities: 3 medium, 1 low, with CVSS scores up to 6.8.
Are any of them being exploited?
None of them is in CISA's Known Exploited Vulnerabilities catalog yet.
Which one should be fixed first?
CVE-2026-59399 (CVSS 6.8): DelegatingDeserializer selects the delegate deserializer for each record from the spring.kafka.serialization.selector (value) or spring.kafka.key.serialization.selector (key) header. When the selecto…