WaratekVRT Sign in

CVE-2023-34040 Spring for Apache Kafka

Affected softwareSpring for Apache Kafka
Severity7.8 High CVSS 3.1 2 scores
Fixed in2.9.11, 3.0.10
WeaknessDeserialization of untrusted data (CWE-502)
Published24 Aug 2023
Updated17 Jun 2026

Description

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.

Exploitation status

Proof of concept only

A proof of concept exists, but no reviewed exploit catalogue lists this CVE.

  • CISA KEV not listed
  • VulnCheck KEV not listed
  • CISA Vulnrichment exploitation: none
  • Indexed PoC 4 indexed Published artifacts you can open, in GitHub PoC; first seen 2023-08-30.
  • EPSS 2.1% chance in 30 days

2 of these are GitHub repositories with fewer than 5 stars. They are listed for reference and don't count toward the exploitation status above.

IndexArtifactStarsFirst seen
GitHub PoC POC for Spring Kafka Deserialization Vulnerability CVE-2023-34040 46 2023-08-30
GitHub PoC Spring-Kafka-Deserialization-Remote-Code-Execution 31 2023-09-28
GitHub PoC huyennhat-dev/cve-2023-34040 1 2024-05-27
GitHub PoC 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. Cre: NVD 2024-04-24

Waratek protection

Protected by Waratek

Waratek has a rule that blocks attacks on this vulnerability.

Decided by A vulnerability class already blocked by an ARMR security rule
Finding Protected by Waratek's ARMR deserialization security rule, which blocks this class of attack at the JVM level without a rule written for this CVE specifically. The CVE's weakness is CWE-502: Deserialization of Untrusted Data.

How to mitigate CVE-2023-34040

Upgrade Spring for Apache Kafka to a release that fixes it: 2.9.11 or 3.0.10. Until you can, Waratek RASP blocks exploitation with its deserialization and process rules. It runs inside the Java application, with no code changes.

Waratek RASP Runtime protection for Java applications

CVSS

7.8 HIGH v3.1 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H 2 metrics

We show the highest score from the newest CVSS version. Scores from different versions can't be compared, and the first score listed is sometimes a 0.0 placeholder.

VersionScoreBandVectorAssignerType
CVSS 3.1 7.8 HIGH CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H NVD Primary published
CVSS 3.1 5.3 MEDIUM CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L security@vmware.com Secondary

Affected software and releases

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
org.springframework.kafka:spring-kafka 2.8.1 2.9.11 unbounded
org.springframework.kafka:spring-kafka 3.0.0 3.0.10 unbounded

Products and versions

2 products, 4 version entries
SourceVendorProductSchemeAffected versions
osv org.springframework.kafka spring-kafka generic ≥ 2.8.1 and < 2.9.11 · ≥ 3.0.0 and < 3.0.10
nvd vmware spring for apache kafka generic ≥ 2.8.1 and ≤ 2.9.10 · ≥ 3.0.0 and ≤ 3.0.9

References

URLTags
https://github.com/spring-projects/spring-kafka/commit/25ac793a78725e2ca4a3a2888a1506a4bfcf0c9d WEB
https://github.com/spring-projects/spring-kafka/commit/eb779679812f61a8553ced3d0e4069dca65560ed WEB
https://github.com/spring-projects/spring-kafka PACKAGE
https://spring.io/security/cve-2023-34040 WEB

Timeline

Published2023-08-24By the CVE Program.
NVD record modified2026-06-17NVD's own last-modified date for this record.