{"answers":{"affected":"4 open source packages ship an affected version, including org.springframework.kafka:spring-kafka. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-34040 in the wild and no public exploit code.","fix":"Upgrade org.springframework.kafka:spring-kafka to a fixed version for your release line: 2.9.11 or 3.0.10.","what":"CVE-2023-34040 is a medium-severity unsafe deserialization vulnerability in Spring For Apache Kafka, published on 24 Aug 2023. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-34040 and fix it if it is affected.\n\nWhat it is: CVE-2023-34040 is a medium-severity unsafe deserialization vulnerability in Spring For Apache Kafka, published on 24 Aug 2023. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-34040 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.springframework.kafka:spring-kafka (Maven): affected from 2.8.1; fixed in 2.9.11\n- org.springframework.kafka:spring-kafka (Maven): affected from 2.8.1; fixed in 2.9.11\n- org.springframework.kafka:spring-kafka (Maven): affected from 3.0.0; fixed in 3.0.10\n- org.springframework.kafka:spring-kafka (Maven): affected from 3.0.0; fixed in 3.0.10\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-34040/ (Markdown: https://insights.sbomify.com/CVE-2023-34040/index.md)","id":"CVE-2023-34040","markdown":"https://insights.sbomify.com/CVE-2023-34040/index.md","name":"CVE-2023-34040","record":{"aliases":["GHSA-crqf-q9fp-hwjw"],"analysis":{"component_type":"library","fix_type":"configuration_change","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"Spring Kafka library","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary code via malicious serialized objects in Kafka headers if specific non-default deserialization settings are enabled.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"vmware","cpe":[{"product":"spring_for_apache_kafka","vendor":"vmware"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"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.\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\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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":"2023-08-30","github_poc":4,"max_poc_stars":46,"metasploit":0,"nuclei":0,"refs":[{"date":"2023-08-30T12:09:15Z","kind":"github_poc","ref":"https://github.com/Contrast-Security-OSS/Spring-Kafka-POC-CVE-2023-34040","stars":46,"title":"POC for Spring Kafka Deserialization Vulnerability CVE-2023-34040"},{"date":"2023-09-28T11:18:35Z","kind":"github_poc","ref":"https://github.com/pyn3rd/CVE-2023-34040","stars":31,"title":"Spring-Kafka-Deserialization-Remote-Code-Execution"},{"date":"2024-05-27T15:57:03Z","kind":"github_poc","ref":"https://github.com/huyennhat-dev/cve-2023-34040","stars":1,"title":null},{"date":"2024-04-24T03:54:16Z","kind":"github_poc","ref":"https://github.com/buiduchoang24/CVE-2023-34040","stars":0,"title":"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"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Java Deserialization vulnerability in Spring-Kafka When Improperly Configured","id":"CVE-2023-34040","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"deserialization","year":"2023"},"n_packages":4,"n_references":1,"next":{"headline":"CVE-2023-34041-Abuse of HTTP Hop-by-Hop Headers in Cloud Foundry Gorouter","id":"CVE-2023-34041"},"packages":[{"ecosystem":"Maven","fixed":["2.9.11"],"introduced":["2.8.1"],"last_affected":[],"package":"org.springframework.kafka:spring-kafka","purl":null,"source":"GHSA-crqf-q9fp-hwjw"},{"ecosystem":"Maven","fixed":["2.9.11"],"introduced":["2.8.1"],"last_affected":[],"package":"org.springframework.kafka:spring-kafka","purl":"pkg:maven/org.springframework.kafka/spring-kafka","source":"GHSA-crqf-q9fp-hwjw"},{"ecosystem":"Maven","fixed":["3.0.10"],"introduced":["3.0.0"],"last_affected":[],"package":"org.springframework.kafka:spring-kafka","purl":null,"source":"GHSA-crqf-q9fp-hwjw"},{"ecosystem":"Maven","fixed":["3.0.10"],"introduced":["3.0.0"],"last_affected":[],"package":"org.springframework.kafka:spring-kafka","purl":"pkg:maven/org.springframework.kafka/spring-kafka","source":"GHSA-crqf-q9fp-hwjw"}],"prev":{"headline":"Auth bypass in Aria Operations for Networks","id":"CVE-2023-34039"},"products":["Spring For Apache Kafka"],"published":"2023-08-24","related":[{"cvss_score":6.5,"headline":"Server-side request forgery in Spring for Apache Kafka","id":"CVE-2026-59278","kev_date_added":null,"published":"2026-08-27"},{"cvss_score":6.5,"headline":"Denial of service in Spring for Apache Kafka","id":"CVE-2026-59317","kev_date_added":null,"published":"2026-08-27"},{"cvss_score":6.5,"headline":"In Spring for Apache Kafka, unbounded delegate cache keyed on user-controlled, potentially malicious selector header","id":"CVE-2026-41726","kev_date_added":null,"published":"2026-06-09"},{"cvss_score":6.5,"headline":"In Spring for Apache Kafka, forged retry topic headers subvert retry routing and backoff behavior","id":"CVE-2026-41727","kev_date_added":null,"published":"2026-06-09"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-10-01","vendors":["Spring"]},"summary":"Attackers can execute arbitrary code via malicious serialized objects in Kafka headers if specific non-default deserialization settings are enabled.","url":"https://insights.sbomify.com/CVE-2023-34040/"}