Description
JsonKafkaHeaderMapper and the deprecated DefaultKafkaHeaderMapper check the header type requested in the spring_json_header_types header against the mapper's trusted packages before deserializing a header value. Because java.lang is trusted by default, the type java.lang.Class passes this check. Deserializing a java.lang.Class header resolves the header value as a class name and loads that class, but the class named in the value is not subject to the trusted packages check.

A malicious producer can use this to make the consumer load, and with some Jackson versions initialize, any class on the consumer's classpath, regardless of the trusted packages configuration. The impact depends on the side effects of the static initializers of the classes present on the classpath, such as resource allocation, driver registration, or blocking.

An application is affected if it consumes records from a topic that an attacker can produce to and maps inbound headers with JsonKafkaHeaderMapper or DefaultKafkaHeaderMapper , which is the default when Jackson is on the classpath.
Published: 2026-12-02
Score: 3.1 Low
EPSS: < 1% Very Low
KEV: No
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

No solution or workaround provided in the CVE record.

Additional remediation guidance may be available on OpenCVE Cloud.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 02 Dec 2026 07:30:00 +0000

Type Values Removed Values Added
Description JsonKafkaHeaderMapper and the deprecated DefaultKafkaHeaderMapper check the header type requested in the spring_json_header_types header against the mapper's trusted packages before deserializing a header value. Because java.lang is trusted by default, the type java.lang.Class passes this check. Deserializing a java.lang.Class header resolves the header value as a class name and loads that class, but the class named in the value is not subject to the trusted packages check. A malicious producer can use this to make the consumer load, and with some Jackson versions initialize, any class on the consumer's classpath, regardless of the trusted packages configuration. The impact depends on the side effects of the static initializers of the classes present on the classpath, such as resource allocation, driver registration, or blocking. An application is affected if it consumes records from a topic that an attacker can produce to and maps inbound headers with JsonKafkaHeaderMapper or DefaultKafkaHeaderMapper , which is the default when Jackson is on the classpath.
Title In Spring for Apache Kafka, trusted-package allowlist bypass via java.lang.Class header type allows arbitrary class initialization
References
Metrics cvssV3_1

{'score': 3.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: vmware

Published:

Updated: 2026-12-02T07:11:27.902Z

Reserved: 2026-07-04T18:15:49.109Z

Link: CVE-2026-59401

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-12-02T08:17:43.960

Modified: 2026-12-02T08:17:43.960

Link: CVE-2026-59401

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses

No weakness.