Advisory Database
  • Advisories
  • Dependency Scanning
  1. maven
  2. ›
  3. org.springframework.kafka/spring-kafka
  4. ›
  5. CVE-2026-41731

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

June 10, 2026 (updated June 12, 2026)

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.

References

  • github.com/advisories/GHSA-xq69-5h5v-x9x4
  • nvd.nist.gov/vuln/detail/CVE-2026-41731
  • spring.io/security/cve-2026-41731

Code Behaviors & Features

Detect and mitigate CVE-2026-41731 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 2.8.11, all versions starting from 2.9.0 up to 2.9.13, all versions starting from 3.2.0 up to 3.2.13, all versions starting from 3.3.0 before 3.3.16, all versions starting from 4.0.0 before 4.0.6

Fixed versions

  • 3.3.16
  • 4.0.6

Solution

Upgrade to versions 3.3.16, 4.0.6 or above.

Impact 8.1 HIGH

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

Learn more about CVSS

Weakness

  • CWE-502: Deserialization of Untrusted Data

Source file

maven/org.springframework.kafka/spring-kafka/CVE-2026-41731.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:22:48 +0000.