CVE-2026-59401

In Spring for Apache Kafka, trusted-package allowlist bypass via java.lang.Class header type allows arbitrary class initialization

Published Dec 2, 2026 CVSS 3.1 · 3.1 Low EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
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.

Weaknesses

No weakness.

Sources

Status
PUBLISHED
Assigner
vmware
Published
Updated
Dec 2, 2026, 7:11 AM
Reserved
Jul 4, 2026, 6:15 PM
Status
Received
Published
Dec 2, 2026, 8:17 AM
Modified
Dec 2, 2026, 8:17 AM