{"id":"CVE-2022-41678","aliases":["CVE-2022-41678","GHSA-53v4-42fg-g287","BIT-ACTIVEMQ-2022-41678"],"related":[],"kind":"vulnerability","state":"published","title":"Apache ActiveMQ: Insufficient API restrictions on Jolokia allow authenticated users to perform RCE","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"Once an user is authenticated on Jolokia, he can potentially trigger arbitrary code execution. \n\nIn details, in ActiveMQ configurations, jetty allows org.jolokia.http.AgentServlet to handler request to /api/jolokia\n\norg.jolokia.http.HttpRequestHandler#handlePostRequest is able to create JmxRequest through JSONObject. And calls to org.jolokia.http.HttpRequestHandler#executeRequest.\n\nInto deeper calling stacks, org.jolokia.handler.ExecHandler#doHandleRequest is able to invoke through refection.\n\nAnd then, RCE is able to be achieved via 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Una vez que un usuario se autentica en Jolokia, potencialmente puede desencadenar la ejecución de código arbitrario. En detalles, en las configuraciones de ActiveMQ, jetty permite que org.jolokia.http.AgentServlet maneje la solicitud a /api/jolokia org.jolokia.http.HttpRequestHandler#handlePostRequest puede crear JmxRequest a través de JSONObject. Y llamadas a org.jolokia.http.HttpRequestHandler#executeRequest. En pilas de llamadas más profundas, org.jolokia.handler.ExecHandler#doHandleRequest puede invocar mediante reflexión. Y luego, RCE se puede lograr a través de jdk.management.jfr.FlightRecorderMXBeanImpl que existe en la versión de Java superior a 11. 1 Call newRecording. 2 Call setConfiguration. Y en él se esconden datos de un webshell. 3 Call startRecording. 4 Call copyTo method. El webshell se escribirá en un archivo .jsp. La mitigación es restringir (de forma predeterminada) las acciones autorizadas en Jolokia o desactivar Jolokia. Se ha definido una configuración de Jolokia más restrictiva en la distribución predeterminada de ActiveMQ. Alentamos a los usuarios a actualizar a la versión de distribuciones ActiveMQ, incluida la configuración actualizada de Jolokia: 5.16.6, 5.17.4, 5.18.0, 6.0.0.","source":"nvd"}],"published":"2023-11-28T15:08:38.338Z","modified":"2026-09-08T08:45:10.186Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-287","CWE-502"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"5.16.6","status":"affected"},{"type":"semver","introduced":"5.17.0","fixed":"5.17.4","status":"affected"},{"version":"5.18.0","status":"unaffected"},{"version":"6.0.0","status":"unaffected"}],"vendor":"Apache Software Foundation","product":"Apache ActiveMQ","package":"org.apache.activemq:apache-activemq","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.16.6"}],"ecosystem":"Maven","package":"org.apache.activemq:apache-activemq","purl":"pkg:maven/org.apache.activemq/apache-activemq","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"5.17.0","status":"affected","fixed":"5.17.4"}],"ecosystem":"Maven","package":"org.apache.activemq:apache-activemq","purl":"pkg:maven/org.apache.activemq/apache-activemq","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.16.6"},{"status":"affected","introduced":"5.17.0","fixed":"5.17.4"}],"vendor":"apache","product":"activemq","cpe":"cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.16.6"},{"type":"semver","introduced":"5.17.0","status":"affected","fixed":"5.17.4"}],"ecosystem":"Bitnami","package":"activemq","purl":"pkg:bitnami/activemq","source":"bitnami"}],"references":[{"url":"https://activemq.apache.org/security-advisories.data/CVE-2022-41678-announcement.txt","tags":["advisory","vendor-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://lists.apache.org/thread/7g17kwbtjl011mm4tr8bn1vnoq9wh4sl","tags":["advisory","mailing-list","vendor-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://www.openwall.com/lists/oss-security/2023/11/28/1","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20240216-0004/","tags":["web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/10/msg00027.html","tags":["web"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-41678","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/apache/activemq/pull/958","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/apache/activemq/commit/5c8d457d9","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/apache/activemq/commit/6120169e563b55323352431dfe9ac67a8b4de6c2","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/apache/activemq/commit/bf65929fd","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/apache/activemq/commit/d8ce1d9ff","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/apache/activemq","tags":["package"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20240216-0004","tags":["web"],"sources":["ghsa"]},{"url":"http://www.openwall.com/lists/oss-security/2023/11/28/1","tags":["web"],"sources":["ghsa"]}],"credits":["wangxin@threatbook.cn","wangzhendong@threatbook.cn","honglonglong@threatbook.cn","Matei \"Mal\" Badanoiu"],"assigner":"apache","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-41678","url":"https://www.cve.org/CVERecord?id=CVE-2022-41678","licence":"CVE Terms of Use","modified":"2025-11-03T21:46:33.574Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-53v4-42fg-g287","url":"https://github.com/advisories/GHSA-53v4-42fg-g287","licence":"CC-BY-4.0","modified":"2025-11-04T17:18:01.053Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-41678","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-41678","licence":"Public domain","modified":"2026-06-17T05:03:37.323Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-ACTIVEMQ-2022-41678","url":"https://osv.dev/vulnerability/BIT-ACTIVEMQ-2022-41678","licence":"Apache-2.0","modified":"2026-09-08T08:45:10.186Z"}],"updatedAt":"2026-11-25T22:58:19.688Z","epss":{"score":0.85829,"percentile":0.99728,"date":"2026-12-01T12:00:22.000Z"}}