Uncontrolled Recursion Affecting org.springframework.kafka:spring-kafka package, versions [,4.0.9)[4.1.0-M1,4.1.3)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

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 applications
  • Snyk IDSNYK-JAVA-ORGSPRINGFRAMEWORKKAFKA-22729388
  • published22 Nov 2026
  • disclosed19 Nov 2026
  • creditJIHUN KIM

Introduced: 19 Nov 2026

NewCVE-2026-59432  (opens in a new tab)
CWE-674  (opens in a new tab)

How to fix?

Upgrade org.springframework.kafka:spring-kafka to version 4.0.9, 4.1.3 or higher.

Overview

Affected versions of this package are vulnerable to Uncontrolled Recursion in the DefaultKafkaHeaderMapper and JsonKafkaHeaderMapper classes, which resolve the array type named in the producer-controlled spring_json_header_types header without bounding its array dimensions or rejecting thread-creating element types. An attacker who can produce to a consumed topic can send a deeply nested array type that recurses per dimension into a StackOverflowError, or a java.util.Timer array that starts a thread per element and exhausts native threads, stopping the listener container on the uncommitted record and again after restart. This requires the application to map inbound headers with one of these mappers, which is the default for @KafkaListener and messaging-converter listeners.

CVSS Base Scores

version 4.0
version 3.1