{"answers":{"affected":"2 open source packages ship an affected version, including com.thoughtworks.xstream:xstream. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-41966 exists.","fix":"Upgrade com.thoughtworks.xstream:xstream to 1.4.20 or later.","what":"CVE-2022-41966 is a high-severity denial of service vulnerability in x-stream xstream, published on 27 Dec 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-41966 and fix it if it is affected.\n\nWhat it is: CVE-2022-41966 is a high-severity denial of service vulnerability in x-stream xstream, published on 27 Dec 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-41966 exists.\n\nAffected packages and fixed versions:\n- com.thoughtworks.xstream:xstream (Maven): affected all versions; fixed in 1.4.20\n- com.thoughtworks.xstream:xstream (Maven): affected all versions; fixed in 1.4.20\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-2022-41966/ (Markdown: https://insights.sbomify.com/CVE-2022-41966/index.md)","id":"CVE-2022-41966","markdown":"https://insights.sbomify.com/CVE-2022-41966/index.md","name":"CVE-2022-41966","record":{"aliases":["DEBIAN-CVE-2022-41966","DLA-3267-1","DSA-5315-1","GHSA-j563-grx4-pjpv","ROOT-APP-MAVEN-CVE-2022-41966","UBUNTU-CVE-2022-41966"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Java XML serialization library","requires_auth":"none","summary":"Remote attackers can cause a stack overflow and crash the application by sending crafted XML input to the XStream library.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"xstream","vendor":"xstream"}],"cvss":{"score":8.2,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H","version":"3.1"},"cwes":[{"id":"CWE-674","name":"Uncontrolled Recursion"},{"id":"CWE-502","name":"Deserialization of Untrusted Data"},{"id":"CWE-121","name":"Stack-based Buffer Overflow"},{"id":"CWE-120","name":"Buffer Copy without Checking Size of Input"}],"description":"XStream serializes Java objects to XML and back again. Versions prior to 1.4.20 may allow a remote attacker to terminate the application with a stack overflow error, resulting in a denial of service only via manipulation the processed input stream. The attack uses the hash code implementation for collections and maps to force recursive hash calculation causing a stack overflow. This issue is patched in version 1.4.20 which handles the stack overflow and raises an InputManipulationException instead. A potential workaround for users who only use HashMap or HashSet and whose XML refers these only as default map or set, is to change the default implementation of java.util.Map and java.util per the code example in the referenced advisory. However, this implies that your application does not care about the implementation of the map and all elements are comparable.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":"2023-01-06","github_poc":1,"max_poc_stars":3,"metasploit":0,"nuclei":0,"refs":[{"date":"2023-01-06T02:37:07Z","kind":"github_poc","ref":"https://github.com/111ddea/Xstream_cve-2022-41966","stars":3,"title":null}],"tier":"weaponised"},"has_fix":true,"headline":"XStream Denial of Service via stack overflow","id":"CVE-2022-41966","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"denial_of_service","year":"2022"},"n_packages":2,"n_references":2,"next":{"headline":"Improper Restriction of XML External Entity Reference in Dragonfly","id":"CVE-2022-41967"},"packages":[{"ecosystem":"Maven","fixed":["1.4.20"],"introduced":["0"],"last_affected":[],"package":"com.thoughtworks.xstream:xstream","purl":null,"source":"GHSA-j563-grx4-pjpv"},{"ecosystem":"Maven","fixed":["1.4.20"],"introduced":["0"],"last_affected":[],"package":"com.thoughtworks.xstream:xstream","purl":"pkg:maven/com.thoughtworks.xstream/xstream","source":"GHSA-j563-grx4-pjpv"}],"prev":{"headline":"Opencast Authenticated OpenRedirect Vulnerability","id":"CVE-2022-41965"},"products":["xstream"],"published":"2022-12-27","related":[{"cvss_score":6.5,"headline":"Stack Buffer Overflow in xstream","id":"CVE-2022-40151","kev_date_added":null,"published":"2022-09-16"}],"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":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-11","vendors":["x-stream"]},"summary":"Remote attackers can cause a stack overflow and crash the application by sending crafted XML input to the XStream library.","url":"https://insights.sbomify.com/CVE-2022-41966/"}