{"id":"CVE-2023-34040","published":"2023-08-24T12:59:20Z","modified":"2024-10-01T16:13:52Z","title":"Java Deserialization vulnerability in Spring-Kafka When Improperly Configured","vendor":"Spring","product":"Spring For Apache Kafka","tier":"tail","description":{"text":"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.\n\nSpecifically, an application is vulnerable when all of the following are true:\n\n  *  The user does not configure an ErrorHandlingDeserializer for the key and/or value of the record\n  *  The user explicitly sets container properties checkDeserExWhenKeyNull and/or checkDeserExWhenValueNull container properties to true.\n  *  The user allows untrusted sources to publish to a Kafka topic\n\n\nBy 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.\n\n\n","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0209,"percentile":0.82071,"provenance":"source"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"references":[{"url":"https://spring.io/security/cve-2023-34040","tags":[]}],"priority":{"score":25.1,"factors":[{"name":"EPSS percentile","points":16.41},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":3.71}]},"exploitSources":{"pocGithub":{"count":4,"skipped":0,"earliest":"2023-08-30","earliestUrl":"https://github.com/Contrast-Security-OSS/Spring-Kafka-POC-CVE-2023-34040","repos":[{"name":"Contrast-Security-OSS/Spring-Kafka-POC-CVE-2023-34040","url":"https://github.com/Contrast-Security-OSS/Spring-Kafka-POC-CVE-2023-34040","stars":46,"created":"2023-08-30"},{"name":"pyn3rd/CVE-2023-34040","url":"https://github.com/pyn3rd/CVE-2023-34040","stars":31,"created":"2023-09-28"},{"name":"huyennhat-dev/cve-2023-34040","url":"https://github.com/huyennhat-dev/cve-2023-34040","stars":1,"created":"2024-05-27"},{"name":"buiduchoang24/CVE-2023-34040","url":"https://github.com/buiduchoang24/CVE-2023-34040","stars":0,"created":"2024-04-24"}]},"first":{"date":"2023-08-30","source":"PoC-in-GitHub","url":"https://github.com/Contrast-Security-OSS/Spring-Kafka-POC-CVE-2023-34040"},"provenance":"source"},"vendorSlug":"spring","affectedVersions":[{"vendor":"Spring","product":"Spring For Apache Kafka","versions":[">= 2.8.x, < 2.9.11",">= 2.9.x, < 2.9.11",">= 3.0.x, < 3.0.10"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-10-01T15:01:28.194900Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Maven","package":"org.springframework.kafka:spring-kafka","vulnerableRanges":[">=2.8.1, <2.9.11",">=3.0.0, <3.0.10"],"patched":["2.9.11","3.0.10"],"from":["GHSA-crqf-q9fp-hwjw"],"provenance":"source"}],"summary":{"text":"A Java deserialization flaw in the Spring for Apache Kafka library affects applications where the container's checkDeserExWhenKeyNull and/or checkDeserExWhenValueNull properties are explicitly set to true without an ErrorHandlingDeserializer configured for the key or value. An attacker who can publish to a Kafka topic the application consumes, and who has local access to the system, can craft a malicious serialized object in a deserialization exception record header, which is processed when those conditions are met.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:16:44Z"},"euvd":{"id":"EUVD-2023-2275","exploited":false,"provenance":"source"}}