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

- **Severity:** MEDIUM 6.5
- **CVSS:** 6.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **Published:** 2026-12-02T07:11:40.690Z
- **Modified:** 2026-12-02T19:26:40.093Z

## Who should check

- Anyone running Spring for Apache Kafka \>= 4.1.0, \< 4.1.2.1; \>= 4.0.0, \< 4.0.8.1; \>= 3.0.0, \< 3.3.18; \>= 2.9.0, \< 2.9.16; \< 2.8.14; \>= 4.1.0, \< 4.1.3; \>= 4.0.0, \< 4.0.9

## Description

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 spring\_json\_header\_types 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 and fixed versions

- Spring for Apache Kafka: \>= 4.1.0, \< 4.1.2.1; \>= 4.0.0, \< 4.0.8.1; \>= 3.0.0, \< 3.3.18; \>= 2.9.0, \< 2.9.16; \< 2.8.14; \>= 4.1.0, \< 4.1.3; \>= 4.0.0, \< 4.0.9 (cvelist)

## Mitigation

- Upgrade Spring for Apache Kafka to 4.0.9 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-59406. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-59406.md
Affected: Spring for Apache Kafka >= 4.1.0, < 4.1.2.1; >= 4.0.0, < 4.0.8.1; >= 3.0.0, < 3.3.18; >= 2.9.0, < 2.9.16; < 2.8.14; >= 4.1.0, < 4.1.3; >= 4.0.0, < 4.0.9
Fixed in: Spring for Apache Kafka 4.1.2.1, Spring for Apache Kafka 4.0.8.1, Spring for Apache Kafka 3.3.18, Spring for Apache Kafka 2.9.16, Spring for Apache Kafka 2.8.14, Spring for Apache Kafka 4.1.3, Spring for Apache Kafka 4.0.9

Steps:
1. Search this machine and project for Spring for Apache Kafka: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-59406 being exploited?

There is no confirmed exploitation: CVE-2026-59406 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-59406?

Medium: CVSS 6.5 (v3.1, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2026-59406?

Spring for Apache Kafka \>= 4.1.0, \< 4.1.2.1; \>= 4.0.0, \< 4.0.8.1; \>= 3.0.0, \< 3.3.18; \>= 2.9.0, \< 2.9.16; \< 2.8.14; \>= 4.1.0, \< 4.1.3; \>= 4.0.0, \< 4.0.9.

### Is there a fix for CVE-2026-59406?

Yes. Fixed in Spring for Apache Kafka 4.1.2.1, Spring for Apache Kafka 4.0.8.1, Spring for Apache Kafka 3.3.18, Spring for Apache Kafka 2.9.16, Spring for Apache Kafka 2.8.14, Spring for Apache Kafka 4.1.3, Spring for Apache Kafka 4.0.9. Upgrade Spring for Apache Kafka to 4.0.9 or later.

### How do I check if I'm affected by CVE-2026-59406?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://spring.io/security/cve-2026-59406>
- other: <https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H&version=3.1>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-59406>

HTML: <https://flawdb.com/CVE-2026-59406> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-59406>
