Skip to main content

CVE-2026-41731 — Vulnerability in spring-kafka — CVE Details

HIGH

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

Published June 10, 2026Updated June 12, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.65%). Schedule for your next planned update.

Does your project use an affected org.springframework.kafka:spring-kafka version?

Paste your pom.xml to check it for CVE-2026-41731 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my pom.xml

Summary

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.

Advisory Timeline

  • First published June 10, 2026 (169 days ago).
  • Last revised June 12, 2026 — 3 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Maven
Update org.springframework.kafka:spring-kafka to 4.0.6 or later
<!-- Update pom.xml dependency version to 4.0.6 for org.springframework.kafka:spring-kafka -->
Maven
Update org.springframework.kafka:spring-kafka to 3.3.16 or later
<!-- Update pom.xml dependency version to 3.3.16 for org.springframework.kafka:spring-kafka -->

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (5)

Affects 1 ecosystem: Maven (1).

PackageFixed In
org.springframework.kafka:spring-kafka Maven · Affected: 4.0.0, 4.0.1, 4.0.2, 4.0.3 (+2 more)4.0.6
org.springframework.kafka:spring-kafka Maven · Affected: 3.2.0, 3.2.1, 3.2.10, 3.2.2 (+7 more)Range-based data available
org.springframework.kafka:spring-kafka Maven · Affected: 1.0.0.RELEASE, 1.0.1.RELEASE, 1.0.2.RELEASE, 1.0.3.RELEASE (+156 more)Range-based data available
org.springframework.kafka:spring-kafka Maven · Affected: 2.9.0, 2.9.1, 2.9.10, 2.9.11 (+10 more)Range-based data available
org.springframework.kafka:spring-kafka Maven · Affected: 3.3.0, 3.3.1, 3.3.10, 3.3.11 (+12 more)3.3.16

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-502
    Deserialization of Untrusted DataMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-41731?
In Spring for Apache Kafka, overly broad trusted-package matching in header mappers exposes JDK classes to deserialization. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.1/10).
How do I check if my project is affected by CVE-2026-41731?
CVE-2026-41731 affects org.springframework.kafka:spring-kafka. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-41731 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.1

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.65%
EPSS percentile: 45.6

This is a below-median EPSS score — only 45.6% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-xq69-5h5v-x9x4

Related CVEs

  • CVE-2026-61689
    HIGH

    XWiki Platform: HQL injection in search allows unauthenticated database extraction including password hashes

  • CVE-2026-107725
    HIGH

    Hazelcast has an authorization bypass in IMap Predicates API

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my pom.xml