{"answers":{"affected":"5 open source packages ship an affected version, including org.apache.activemq:apache-activemq and activemq. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-41678 exists.","fix":"Upgrade org.apache.activemq:apache-activemq to a fixed version for your release line: 5.16.6 or 5.17.4.","what":"CVE-2022-41678 is a high-severity code injection vulnerability in Apache Activemq, published on 28 Nov 2023. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-41678 and fix it if it is affected.\n\nWhat it is: CVE-2022-41678 is a high-severity code injection vulnerability in Apache Activemq, published on 28 Nov 2023. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-41678 exists.\n\nAffected packages and fixed versions:\n- org.apache.activemq:apache-activemq (Maven): affected all versions; fixed in 5.16.6\n- org.apache.activemq:apache-activemq (Maven): affected all versions; fixed in 5.16.6\n- org.apache.activemq:apache-activemq (Maven): affected from 5.17.0; fixed in 5.17.4\n- org.apache.activemq:apache-activemq (Maven): affected from 5.17.0; fixed in 5.17.4\n- activemq (Bitnami): affected all versions; fixed in 5.16.6, 5.17.4\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-41678/ (Markdown: https://insights.sbomify.com/CVE-2022-41678/index.md)","id":"CVE-2022-41678","markdown":"https://insights.sbomify.com/CVE-2022-41678/index.md","name":"CVE-2022-41678","record":{"aliases":["BIT-activemq-2022-41678","DEBIAN-CVE-2022-41678","GHSA-53v4-42fg-g287","OESA-2023-1925","UBUNTU-CVE-2022-41678"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Apache ActiveMQ","requires_auth":"low_privilege","summary":"Authenticated users can achieve remote code execution via Jolokia API due to insufficient restrictions, requiring an upgrade to secure versions.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"apache","cpe":[{"product":"activemq","vendor":"apache"}],"cvss":{"score":8.8,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-287","name":"Improper Authentication"}],"description":"Once an user is authenticated on Jolokia, he can potentially trigger arbitrary code execution. \n\nIn details, in ActiveMQ configurations, jetty allows\norg.jolokia.http.AgentServlet to handler request to /api/jolokia\n\norg.jolokia.http.HttpRequestHandler#handlePostRequest is able to\ncreate JmxRequest through JSONObject. And calls to\norg.jolokia.http.HttpRequestHandler#executeRequest.\n\nInto deeper calling stacks,\norg.jolokia.handler.ExecHandler#doHandleRequest can be invoked\nthrough refection. This could lead to RCE through via\nvarious mbeans. One example is unrestricted deserialization in jdk.management.jfr.FlightRecorderMXBeanImpl which exists on Java version above 11.\n\n1 Call newRecording.\n\n2 Call setConfiguration. And a webshell data hides in it.\n\n3 Call startRecording.\n\n4 Call copyTo method. The webshell will be written to a .jsp file.\n\nThe mitigation is to restrict (by default) the actions authorized on Jolokia, or disable Jolokia.\nA more restrictive Jolokia configuration has been defined in default ActiveMQ distribution. We encourage users to upgrade to ActiveMQ distributions version including updated Jolokia configuration: 5.16.6, 5.17.4, 5.18.0, 6.0.0.","ecosystems":["Bitnami","Maven"],"exploits":{"exploitdb":0,"first_seen":"2024-11-28","github_poc":3,"max_poc_stars":86,"metasploit":0,"nuclei":1,"refs":[{"date":"2026-04-20T02:38:50Z","kind":"github_poc","ref":"https://github.com/Catherines77/ActiveMQ-EXPtools","stars":86,"title":"Apache ActiveMQ漏洞综合利用工具(CVE-2015-5254，CVE-2016-3088，CVE-2022-41678，CVE-2023-46604，CVE-2024-32114，CVE-2026-34197，CVE-2026-40466， CVE-2026-42588)"},{"date":"2024-11-28T20:48:21Z","kind":"github_poc","ref":"https://github.com/mbadanoiu/CVE-2022-41678","stars":2,"title":"CVE-2022-41678: Dangerous MBeans Accessible via Jolokia API in Apache ActiveMQ"},{"date":"2025-10-14T14:18:48Z","kind":"github_poc","ref":"https://github.com/URJACK2025/CVE-2022-41678","stars":2,"title":"CVE-2022-41678 是 Apache ActiveMQ 中的一个远程代码执行漏洞。该漏洞允许攻击者通过 JMX (Java Management Extensions) 接口修改 Log4j 配置或 JFR (Java Flight Recorder) 配置，从而写入恶意的 JSP webshell 到服务器的 web 目录中，最终实现远程代码执行。"},{"date":null,"kind":"nuclei","ref":"http/cves/2022/CVE-2022-41678.yaml","stars":null,"title":"Apache ActiveMQ \u003c 5.16.5/5.17.3 - Remote Code Execution"}],"tier":"weaponised"},"has_fix":true,"headline":"Apache ActiveMQ: Insufficient API restrictions on Jolokia allow authenticated users to perform RCE","id":"CVE-2022-41678","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"apache:activemq","products":["apache:activemq"],"type":"code_injection","year":"2022"},"n_packages":5,"n_references":4,"next":{"headline":"Cross-site scripting in Forma LMS version","id":"CVE-2022-41679"},"packages":[{"ecosystem":"Bitnami","fixed":["5.16.6","5.17.4"],"introduced":["0","5.17.0"],"last_affected":[],"package":"activemq","purl":"pkg:bitnami/activemq","source":"BIT-activemq-2022-41678"},{"ecosystem":"Maven","fixed":["5.16.6"],"introduced":["0"],"last_affected":[],"package":"org.apache.activemq:apache-activemq","purl":null,"source":"GHSA-53v4-42fg-g287"},{"ecosystem":"Maven","fixed":["5.16.6"],"introduced":["0"],"last_affected":[],"package":"org.apache.activemq:apache-activemq","purl":"pkg:maven/org.apache.activemq/apache-activemq","source":"GHSA-53v4-42fg-g287"},{"ecosystem":"Maven","fixed":["5.17.4"],"introduced":["5.17.0"],"last_affected":[],"package":"org.apache.activemq:apache-activemq","purl":null,"source":"GHSA-53v4-42fg-g287"},{"ecosystem":"Maven","fixed":["5.17.4"],"introduced":["5.17.0"],"last_affected":[],"package":"org.apache.activemq:apache-activemq","purl":"pkg:maven/org.apache.activemq/apache-activemq","source":"GHSA-53v4-42fg-g287"}],"prev":{"headline":"Information disclosure in Camera Firmware","id":"CVE-2022-41677"},"products":["Apache ActiveMQ"],"published":"2023-11-28","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"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2025-11-03","vendors":["Apache Software Foundation"]},"summary":"Authenticated users can achieve remote code execution via Jolokia API due to insufficient restrictions, requiring an upgrade to secure versions.","url":"https://insights.sbomify.com/CVE-2022-41678/"}