CVE-2023-34040

Java Deserialization vulnerability in Spring-Kafka When Improperly Configured

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.

Category

5.3
CVSS
Severity: Medium
CVSS 3.1 •
EPSS 25.60% Top 5%
Vendor Advisory spring.io
Affected: Spring Spring For Apache Kafka
Published at:
Updated at:

References

Link Tags
https://spring.io/security/cve-2023-34040 mitigation vendor advisory

Frequently Asked Questions

What is the severity of CVE-2023-34040?
CVE-2023-34040 has been scored as a medium severity vulnerability.
How to fix CVE-2023-34040?
To fix CVE-2023-34040, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2023-34040 being actively exploited in the wild?
It is possible that CVE-2023-34040 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~26% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2023-34040?
CVE-2023-34040 affects Spring Spring For Apache Kafka.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.