CVE-2026-41731 In Spring for Apache Kafka, overly broad trusted-package matching in header mappers exposes JDK classes to deserialization

High 8.1 Published Updated

Attackers can achieve remote code execution by exploiting overly broad trusted-package matching in Spring for Apache Kafka header mappers.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-41731?

CVE-2026-41731 is a high-severity unsafe deserialization vulnerability in Spring for Apache Kafka, published on 9 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-502

Which versions are affected by CVE-2026-41731?

10 open source packages ship an affected version, including org.springframework.kafka:spring-kafka. It affects 3 products.

PackageAffectedFixed in
org.springframework.kafka:spring-kafka MavenAll versions to 2.8.11None
org.springframework.kafka:spring-kafka MavenAll versions to 2.8.11None
org.springframework.kafka:spring-kafka MavenFrom 2.9.0 to 2.9.13None
org.springframework.kafka:spring-kafka MavenFrom 2.9.0 to 2.9.13None
org.springframework.kafka:spring-kafka MavenFrom 3.2.0 to 3.2.13None
org.springframework.kafka:spring-kafka MavenFrom 3.2.0 to 3.2.13None
4 more packages
org.springframework.kafka:spring-kafka MavenFrom 3.3.03.3.16
org.springframework.kafka:spring-kafka MavenFrom 3.3.03.3.16
org.springframework.kafka:spring-kafka MavenFrom 4.0.04.0.6
org.springframework.kafka:spring-kafka MavenFrom 4.0.04.0.6

Products include Redhat Fuse, Redhat Jboss Enterprise Application Platform Expansion Pack, Vmware Spring for Apache Kafka.

How do I fix CVE-2026-41731?

Upgrade org.springframework.kafka:spring-kafka to a fixed version for your release line: 3.3.16 or 4.0.6.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is CVE-2026-41731 being exploited?

There is no known exploitation of CVE-2026-41731 in the wild and no public exploit code.

Sources

Also known as GHSA-xq69-5h5v-x9x4, MINI-5q4c-qr79-rrqg, MINI-m6jw-pfrj-p7vx, ROOT-APP-MAVEN-CVE-2026-41731.

Is CVE-2026-41731 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free