# CVE-2026-41731: VMware Spring for Apache Kafka deserialization in JsonKafkaHeaderMapper

Source: https://junglewise.ai/threats/cve-2026-41731-vmware-spring-for-apache-kafka-deserialization-in  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-10. Updated: 2026-06-12  
License: CC BY 4.0 with a link back

CVE-2026-41731 · Severity: high · CVSS 8.1 · Published 2026-06-10

Spring for Apache Kafka contains a vulnerability in how it handles message headers during data processing. A malicious actor could send specially crafted messages that force the system to run unintended code, potentially leading to full system compromise or unauthorized data access. This affects applications using Spring to integrate with Kafka message brokers.

Technologies: [org.springframework.kafka:spring-kafka (Maven)](https://junglewise.ai/threats/technologies/org-springframework-kafka-spring-kafka), [VMware Spring for Apache Kafka](https://junglewise.ai/threats/technologies/spring-for-apache-kafka). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven), [VMware](https://junglewise.ai/threats/vendors/vmware).

## Quick answers

**Is CVE-2026-41731 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-41731 being exploited in the wild.

**How severe is CVE-2026-41731?** High severity, with a CVSS score of 8.1, published 10 June 2026.

**Which products and versions are affected?** org.springframework.kafka:spring-kafka (Maven) ECOSYSTEM:introduced=4.0.0,fixed=4.0.6; VMware 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.

**Is there a fix for CVE-2026-41731?** Yes. org.springframework.kafka:spring-kafka (Maven): upgrade to 4.0.6 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-41731 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-41731?** Check whether you run org.springframework.kafka:spring-kafka (Maven) or VMware Spring for Apache Kafka at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- org.springframework.kafka:spring-kafka (Maven): upgrade to 4.0.6 or later

  ```sh
  # set org.springframework.kafka:spring-kafka to 4.0.6 in your pom.xml or build.gradle
  ```


## Technical details

A deserialization vulnerability exists in Spring for Apache Kafka's JsonKafkaHeaderMapper and the deprecated DefaultKafkaHeaderMapper. The root cause is a prefix-based check for trusted packages in header mappers, which inadvertently trusts all subpackages if a parent package is trusted. When combined with Jackson's default bean deserialization, a remote attacker can provide crafted header values in a Kafka message to trigger the deserialization of arbitrary JDK types. This can lead to remote code execution (RCE) depending on the available gadgets on the classpath. Users should upgrade to versions 4.0.6, 3.3.16, or later.

## Affected products

- Spring spring-kafka 4.0.0 to 4.0.5, 3.3.0 to 3.3.15, 3.2.0 to 3.2.13, 2.9.0 to 2.9.13, <= 2.8.11

## Identifiers

- CVE-2026-41731
- GHSA-xq69-5h5v-x9x4

## Timeline

- 2026-06-10: advisory: Initial advisory published
- 2026-06-12: other: Advisory updated and reviewed

## References

- [https://api.github.com/users/oscerd](https://api.github.com/users/oscerd)
- [https://github.com/oscerd](https://github.com/oscerd)
- [https://api.github.com/users/oscerd/gists%7B/gist_id%7D](https://api.github.com/users/oscerd/gists%7B/gist_id%7D)
- [https://api.github.com/users/oscerd/repos](https://api.github.com/users/oscerd/repos)
- [https://avatars.githubusercontent.com/u/5106647?v=4](https://avatars.githubusercontent.com/u/5106647?v=4)
- [https://api.github.com/users/oscerd/events%7B/privacy%7D](https://api.github.com/users/oscerd/events%7B/privacy%7D)

## Related threats

- [VMware Spring Kafka improper input validation in retry topic infrastructure](https://junglewise.ai/threats/cve-2026-41727-vmware-spring-kafka-improper-input-validation-in-retry-topic)
- [VMware Spring for Apache Kafka denial of service in DelegatingDeserializer](https://junglewise.ai/threats/cve-2026-41726-vmware-spring-for-apache-kafka-denial-of-service-in)
- [Spring-Kafka has Java Deserialization vulnerability When Improperly Configured](https://junglewise.ai/threats/cve-2023-34040-spring-kafka-has-java-deserialization-vulnerability-when)
