Loading...
Skip to main content

CVE-2026-41731 — Vulnerability in...

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

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 (124 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, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (5)

Affects 1 ecosystem: maven (1).

PackageEcosystemAffectedFixed In
org.springframework.kafka:spring-kafka
maven
4.0.0, 4.0.1, 4.0.2, 4.0.3 (+2 more)4.0.6
org.springframework.kafka:spring-kafka
maven
3.2.0, 3.2.1, 3.2.10, 3.2.2 (+7 more)Range-based data available
org.springframework.kafka:spring-kafka
maven
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
2.9.0, 2.9.1, 2.9.10, 2.9.11 (+10 more)Range-based data available
org.springframework.kafka:spring-kafka
maven
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. 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

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-xq69-5h5v-x9x4

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies