{"answers":{"affected":"3 open source packages ship an affected version, including activemq and com.thoughtworks.xstream:xstream. It affects 16 products.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-21351 exists.","fix":"Upgrade activemq to 5.15.14 or later.","what":"CVE-2021-21351 is a medium-severity vulnerability in Apache Activemq, published on 22 Mar 2021."},"fix_prompt":"Check this codebase for CVE-2021-21351 and fix it if it is affected.\n\nWhat it is: CVE-2021-21351 is a medium-severity vulnerability in Apache Activemq, published on 22 Mar 2021. \nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-21351 exists.\n\nAffected packages and fixed versions:\n- activemq (Bitnami): affected all versions up to 5.16.0; fixed in 5.15.14\n- com.thoughtworks.xstream:xstream (Maven): affected all versions; fixed in 1.4.16\n- com.thoughtworks.xstream:xstream (Maven): affected all versions; fixed in 1.4.16\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-2021-21351/ (Markdown: https://insights.sbomify.com/CVE-2021-21351/index.md)","id":"CVE-2021-21351","markdown":"https://insights.sbomify.com/CVE-2021-21351/index.md","name":"CVE-2021-21351","record":{"aliases":["BIT-activemq-2021-21351","DEBIAN-CVE-2021-21351","GHSA-hrcp-8f3q-4w2c","UBUNTU-CVE-2021-21351"],"analysis":null,"analysis_generated_by":null,"assigner":"GitHub_M","cpe":[{"product":"activemq","vendor":"apache"},{"product":"jmeter","vendor":"apache"},{"product":"debian_linux","vendor":"debian"},{"product":"fedora","vendor":"fedoraproject"},{"product":"oncommand_insight","vendor":"netapp"},{"product":"banking_enterprise_default_management","vendor":"oracle"},{"product":"banking_platform","vendor":"oracle"},{"product":"banking_virtual_account_management","vendor":"oracle"},{"product":"business_activity_monitoring","vendor":"oracle"},{"product":"communications_billing_and_revenue_management_elastic_charging_engine","vendor":"oracle"},{"product":"communications_policy_management","vendor":"oracle"},{"product":"communications_unified_inventory_management","vendor":"oracle"},{"product":"mysql_server","vendor":"oracle"},{"product":"retail_xstore_point_of_service","vendor":"oracle"},{"product":"webcenter_portal","vendor":"oracle"},{"product":"xstream","vendor":"xstream"}],"cvss":{"score":5.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"},{"id":"CWE-434","name":"Unrestricted Upload of File with Dangerous Type"}],"description":"XStream is a Java library to serialize objects to XML and back again. In XStream before version 1.4.16, there is a vulnerability may allow a remote attacker to load and execute arbitrary code from a remote host only by manipulating the processed input stream. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. If you rely on XStream's default blacklist of the Security Framework, you will have to use at least version 1.4.16.","ecosystems":["Bitnami","Maven"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":1,"refs":[{"date":null,"kind":"nuclei","ref":"http/cves/2021/CVE-2021-21351.yaml","stars":null,"title":"XStream \u003c1.4.16 - Remote Code Execution"}],"tier":"weaponised"},"has_fix":true,"headline":"XStream is vulnerable to an Arbitrary Code Execution attack","id":"CVE-2021-21351","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"apache:activemq","products":["apache:activemq","debian:debian_linux","fedoraproject:fedora","netapp:oncommand_insight","oracle:banking_platform","oracle:communications_policy_management","oracle:communications_unified_inventory_management","oracle:mysql_server","oracle:retail_xstore_point_of_service","oracle:webcenter_portal"],"type":null,"year":"2021"},"n_packages":3,"n_references":15,"next":{"headline":"Predictable tokens used for password resets","id":"CVE-2021-21352"},"packages":[{"ecosystem":"Bitnami","fixed":["5.15.14"],"introduced":["0","5.16.0","5.16.1"],"last_affected":["5.16.0","5.16.1"],"package":"activemq","purl":"pkg:bitnami/activemq","source":"BIT-activemq-2021-21351"},{"ecosystem":"Maven","fixed":["1.4.16"],"introduced":["0"],"last_affected":[],"package":"com.thoughtworks.xstream:xstream","purl":null,"source":"GHSA-hrcp-8f3q-4w2c"},{"ecosystem":"Maven","fixed":["1.4.16"],"introduced":["0"],"last_affected":[],"package":"com.thoughtworks.xstream:xstream","purl":"pkg:maven/com.thoughtworks.xstream/xstream","source":"GHSA-hrcp-8f3q-4w2c"}],"prev":{"headline":"XStream is vulnerable to an Arbitrary Code Execution attack","id":"CVE-2021-21350"},"products":["xstream"],"published":"2021-03-22","related":[{"cvss_score":10,"headline":"Apache ActiveMQ Deserialization of Untrusted Data","id":"CVE-2023-46604","kev_date_added":"2023-11-02","published":"2023-10-27"},{"cvss_score":9.8,"headline":"Apache ActiveMQ Improper Input Validation","id":"CVE-2016-3088","kev_date_added":"2022-02-10","published":"2016-06-01"},{"cvss_score":8.8,"headline":"Apache ActiveMQ Improper Input Validation","id":"CVE-2026-34197","kev_date_added":"2026-04-16","published":"2026-04-07"},{"cvss_score":9.8,"headline":"Remote code execution in Apache ActiveMQ","id":"CVE-2020-11998","kev_date_added":null,"published":"2020-09-10"},{"cvss_score":9.8,"headline":"Command Injection in Xstream","id":"CVE-2013-7285","kev_date_added":null,"published":"2019-05-15"},{"cvss_score":9.8,"headline":"Improper Restriction of XML External Entity Reference in Apache ActiveMQ","id":"CVE-2014-3600","kev_date_added":null,"published":"2017-10-27"},{"cvss_score":9.8,"headline":"Improper Input Validation in Apache ActiveMQ","id":"CVE-2015-5254","kev_date_added":null,"published":"2016-01-08"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"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":"attribution","licence":"MIT","name":"Nuclei templates"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-10-07","vendors":["x-stream"]},"summary":null,"url":"https://insights.sbomify.com/CVE-2021-21351/"}