CVE-2026-59401
In Spring for Apache Kafka, trusted-package allowlist bypass via java.lang.Class header type allows arbitrary class initialization
Mitigation
- Upgrade Spring for Apache Kafka to 4.0.9 or later.
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
Vulnerability facts
- 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
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 3.1 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: Low
- Modified
Description
JsonKafkaHeaderMapper and the deprecated DefaultKafkaHeaderMapper check the header type requested in the spring_json_header_types header against the mapper's trusted packages before deserializing a header value. Because java.lang is trusted by default, the type java.lang.Class passes this check. Deserializing a java.lang.Class header resolves the header value as a class name and loads that class, but the class named in the value is not subject to the trusted packages check. A malicious producer can use this to make the consumer load, and with some Jackson versions initialize, any class on the consumer's classpath, regardless of the trusted packages configuration. The impact depends on the side effects of the static initializers of the classes present on the classpath, such as resource allocation, driver registration, or blocking. An application is affected if it consumes records from a topic that an attacker can produce to and maps inbound headers with JsonKafkaHeaderMapper or DefaultKafkaHeaderMapper , which is the default when Jackson is on the classpath.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| 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 |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-59401. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-59401.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.
References
FAQ
Is CVE-2026-59401 being exploited?
There is no confirmed exploitation: CVE-2026-59401 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.
How serious is CVE-2026-59401?
Low: CVSS 3.1 (v3.1, scored by CNA). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2026-59401?
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-59401?
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-59401?
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.
More spring vulnerabilities
See all| Severity | Identifier / vulnerability | Technology | Signals | Age |
|---|---|---|---|---|
| HIGH 7.5 | CVE-2026-59444 Spring Integration Redis Queue Unsafe Java Deserialization | Spring | ||
| MEDIUM 6.5 | CVE-2026-59443 Spring Integration FluxAggregatorMessageHandler unbounded memory consumption via the sequenceSize message header | Spring | ||
| LOW 3.1 | CVE-2026-59441 Subpackage Deserialization in Spring Cloud Stream | Spring | ||
| LOW 3.1 | CVE-2026-59440 Potential for arbitrary Class Loading in Spring Cloud Function | Spring | ||
| LOW 3.1 | CVE-2026-59439 Spring Cloud Function allows unbounded JSON Collection | Spring |