VDB

CVE-2023-34040

CVE-2023-34040 PUBLISHED CVSS 5.3 MEDIUM

Java Deserialization vulnerability in Spring-Kafka When Improperly Configured

Reported by vmware · Published August 24, 2023

spring-kafka is fixed in 3.0.10 and 2.9.11 (Maven Central)

In Spring for Apache Kafka 3.0.9 and earlier and versions 2.9.10 and earlier, a possible deserialization attack vector existed, but only if unusual configuration was applied. An attacker would have to construct a malicious serialized object in one of the deserialization exception record headers. Specifically, an application is vulnerable when all of the following are true: * The user does not configure an ErrorHandlingDeserializer for the key and/or value of the record * The user explicitly sets container properties checkDeserExWhenKeyNull and/or checkDeserExWhenValueNull container properties to true. * The user allows untrusted sources to publish to a Kafka topic By default, these properties are false, and the container only attempts to deserialize the headers if an ErrorHandlingDeserializer is configured. The ErrorHandlingDeserializer prevents the vulnerability by removing any such malicious headers before processing the record.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
org.springframework.kafka:spring-kafkaMaven Central3.0.10, 2.9.11
Spring For Apache KafkaSpring3.0.10, 2.9.11
spring_for_apache_kafkavmware3.0.9, 2.9.10

Risk scores

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

Affected products

VendorProductVersions
SpringSpring For Apache Kafka2.8.x, 2.9.x, 3.0.x
Mavenorg.springframework.kafka:spring-kafka2.8.1, 3.0.0
SpringSpring For Apache Kafka2.8.x, 2.9.x, 3.0.x

Timeline

  • Aug 24, 2023 CVE Published
  • Aug 24, 2023 PoC Published (11 in total, the first dated here)
  • Aug 25, 2023 EPSS Score (30 in total, the first dated here)
  • Dec 18, 2023 CVE Updated
  • Mar 30, 2026 Security Advisory
  • Aug 9, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2023-34040
vulnetix vdb fixes CVE-2023-34040

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-34040/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›