Miggo Logo

CVE-2023-34040: Spring-Kafka has Java Deserialization vulnerability When Improperly Configured

7.8

CVSS Score
3.1

Basic Information

EPSS Score
0.94568%
Published
8/24/2023
Updated
11/5/2024
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.springframework.kafka:spring-kafkamaven>= 3.0.0, < 3.0.103.0.10
org.springframework.kafka:spring-kafkamaven>= 2.8.1, < 2.9.112.9.11

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from unsafe deserialization of Kafka record headers. The deprecated ListenerUtils methods directly deserialized header contents without validating the header type, which could be exploited when: 1) ErrorHandlingDeserializer isn't used to sanitize headers, 2) checkDeserExWhen*Null flags are enabled, and 3) untrusted data is allowed. The patched version introduces DeserializationExceptionHeader type checks in SerializationUtils equivalents, which the original functions lacked.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

In Sprin* *or *p**** K**k* *.*.* *n* **rli*r *n* v*rsions *.*.** *n* **rli*r, * possi*l* **s*ri*liz*tion *tt**k v**tor *xist**, *ut only i* unusu*l *on*i*ur*tion w*s *ppli**. *n *tt**k*r woul* **v* to *onstru*t * m*li*ious s*ri*liz** o*j**t in on* o*

Reasoning

T** vuln*r**ility st*ms *rom uns*** **s*ri*liz*tion o* K**k* r**or* *****rs. T** **pr***t** `List*n*rUtils` m*t*o*s *ir**tly **s*ri*liz** *****r *ont*nts wit*out `v*li**tin*` t** *****r typ*, w*i** *oul* ** *xploit** w**n: *) `*rror**n*lin***s*ri*liz