In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade org.springframework.kafka:spring-kafka to version 4.0.9, 4.1.3 or higher.
Affected versions of this package are vulnerable to Memory Allocation with Excessive Size Value in the DefaultKafkaHeaderMapper and JsonKafkaHeaderMapper classes, which deserialize an inbound header into a type named by the producer-controlled spring_json_header_types header, trusting org.springframework.util by default. An attacker who can produce to a consumed topic can name org.springframework.util.ResizableByteArrayOutputStream with a large numeric value to allocate a buffer of that size, exhausting the heap: with Jackson 3 a single header raises an uncaught OutOfMemoryError that halts the listener, and with Jackson 2 one record with many such headers exhausts memory. This requires the application to map inbound headers with one of these mappers, which is the default for @KafkaListener and listeners using the messaging message converters.