CVE-2026-41731: CWE-502: Deserialization of Untrusted Data in Spring Spring for Apache Kafka
JsonKafkaHeaderMapper and the deprecated DefaultKafkaHeaderMapper matched type headers against trusted packages using a prefix check, meaning that trusting any package implicitly trusted all of its subpackages. Combined with Jackson's default bean deserialization, a producer could supply crafted header values that caused the consumer to deserialize arbitrary JDK types. Affected versions: Spring for Apache Kafka 4.0.0 through 4.0.5; 3.3.0 through 3.3.15; 3.2.0 through 3.2.13; 2.9.0 through 2.9.13; 2.8.0 through 2.8.11.
AI Analysis
Technical Summary
The vulnerability exists in the JsonKafkaHeaderMapper and the deprecated DefaultKafkaHeaderMapper components of Spring for Apache Kafka. These components matched type headers against trusted packages using a prefix check, implicitly trusting all subpackages. Combined with Jackson's default bean deserialization, this allows a malicious producer to supply crafted header values that cause the consumer to deserialize arbitrary Java Development Kit (JDK) types. This deserialization flaw (CWE-502) can lead to arbitrary code execution on affected systems. The affected versions include Spring for Apache Kafka 4.0.0 through 4.0.5, 3.3.0 through 3.3.15, 3.2.0 through 3.2.13, 2.9.0 through 2.9.13, and 2.8.0 through 2.8.11. The Red Hat advisory confirms the issue but states that no mitigation or fix currently meets their criteria for deployment.
Potential Impact
Successful exploitation allows a remote attacker to execute arbitrary code on the consumer system by supplying crafted Kafka header values that trigger unsafe deserialization of arbitrary JDK types. This compromises confidentiality, integrity, and availability of the affected system, as indicated by the CVSS 3.1 score of 8.1 (high severity). There are no known exploits in the wild at this time.
Mitigation Recommendations
According to the Red Hat advisory, no official fix or patch is currently available, and existing mitigation options do not meet criteria for ease of use, applicability, or stability. Users should monitor the vendor advisory for updates. Until a fix is released, consider restricting or validating Kafka header inputs where possible and applying any vendor-recommended workarounds once available. Avoid trusting untrusted Kafka producers.
CVE-2026-41731: CWE-502: Deserialization of Untrusted Data in Spring Spring for Apache Kafka
Description
JsonKafkaHeaderMapper and the deprecated DefaultKafkaHeaderMapper matched type headers against trusted packages using a prefix check, meaning that trusting any package implicitly trusted all of its subpackages. Combined with Jackson's default bean deserialization, a producer could supply crafted header values that caused the consumer to deserialize arbitrary JDK types. Affected versions: Spring for Apache Kafka 4.0.0 through 4.0.5; 3.3.0 through 3.3.15; 3.2.0 through 3.2.13; 2.9.0 through 2.9.13; 2.8.0 through 2.8.11.
CVSS v3.1
Score 8.1high
Affected software
Spring
Spring for Apache Kafka
pkg:maven/org.springframework.kafka/spring-kafkaRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in the JsonKafkaHeaderMapper and the deprecated DefaultKafkaHeaderMapper components of Spring for Apache Kafka. These components matched type headers against trusted packages using a prefix check, implicitly trusting all subpackages. Combined with Jackson's default bean deserialization, this allows a malicious producer to supply crafted header values that cause the consumer to deserialize arbitrary Java Development Kit (JDK) types. This deserialization flaw (CWE-502) can lead to arbitrary code execution on affected systems. The affected versions include Spring for Apache Kafka 4.0.0 through 4.0.5, 3.3.0 through 3.3.15, 3.2.0 through 3.2.13, 2.9.0 through 2.9.13, and 2.8.0 through 2.8.11. The Red Hat advisory confirms the issue but states that no mitigation or fix currently meets their criteria for deployment.
Potential Impact
Successful exploitation allows a remote attacker to execute arbitrary code on the consumer system by supplying crafted Kafka header values that trigger unsafe deserialization of arbitrary JDK types. This compromises confidentiality, integrity, and availability of the affected system, as indicated by the CVSS 3.1 score of 8.1 (high severity). There are no known exploits in the wild at this time.
Mitigation Recommendations
According to the Red Hat advisory, no official fix or patch is currently available, and existing mitigation options do not meet criteria for ease of use, applicability, or stability. Users should monitor the vendor advisory for updates. Until a fix is released, consider restricting or validating Kafka header inputs where possible and applying any vendor-recommended workarounds once available. Avoid trusting untrusted Kafka producers.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- vmware
- Date Reserved
- 2026-04-22T06:21:39.015Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-41731","vendor":"Red Hat"}]
Threat ID: 6a28a8098dd33fbd8595f113
Added to database: 06/09/2026, 23:55:53 UTC
Last enriched: 08/05/2026, 12:59:34 UTC
Last updated: 09/14/2026, 04:51:30 UTC
Views: 233
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.