ActivemqApplication · Apache

CVE-2022-41678

HIGH · 8.8 CVSS v3.1 Published 2023-11-28
Fix available
A fix is available. Upgrade to 5.16.6 / 5.17.4 or later.
See remediation →
94/100
Remediation priority · Urgent
High EPSS Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Once an user is authenticated on Jolokia, he can potentially trigger arbitrary code execution.  In details, in ActiveMQ configurations, jetty allows org.jolokia.http.AgentServlet to handler request to /api/jolokia org.jolokia.http.HttpRequestHandler#handlePostRequest is able to create JmxRequest through JSONObject. And calls to org.jolokia.http.HttpRequestHandler#executeRequest. Into deeper calling stacks, org.jolokia.handler.ExecHandler#doHandleRequest can be invoked through refection. This could lead to RCE through via various mbeans. One example is unrestricted deserialization in jdk.management.jfr.FlightRecorderMXBeanImpl which exists on Java version above 11. 1 Call newRecording. 2 Call setConfiguration. And a webshell data hides in it. 3 Call startRecording. 4 Call copyTo method. The webshell will be written to a .jsp file. The mitigation is to restrict (by default) the actions authorized on Jolokia, or disable Jolokia. A 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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Authenticated users on Jolokia-equipped ActiveMQ can achieve RCE by calling ExecHandler to trigger JDK FlightRecorderMXBeanImpl methods. The attack chain creates a recording, embeds webshell payload in setConfiguration, starts the recording, then uses copyTo to write a .jsp file to disk.

MitigationApply restrictive Jolokia configuration (limiting allowed actions) or disable Jolokia entirely. Upgrade to ActiveMQ 5.16.6+, 5.17.4+, 5.18.0+, or 6.0.0 which include hardened Jolokia settings by default.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
ActivemqApplication
Affected:< 5.16.6>= 5.17.0, < 5.17.4

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify ActiveMQ version
    Check the version file in the ActiveMQ installation - typically found in RELEASE_NOTES, wrapper.conf, or the broker JAR's manifest. Run: grep -r '5\.' $ACTIVEMQ_HOME/lib/activemq-broker-*.jar 2>/dev/null || find $ACTIVEMQ_HOME -name 'version.txt' -o -name 'RELEASE_NOTES' | xargs grep -i version
    Affected if The installed version falls outside the safe ranges: it is below 5.16.6, or between 5.17.0 and 5.17.4 inclusive. Versions 5.16.6+, 5.17.4+, 5.18.0+, and 6.0.0+ are not affected.
  2. Confirm Jolokia endpoint is exposed
    Check if the Jolokia HTTP endpoint is accessible on the default web console port. Run: curl -s -o /dev/null -w '%{http_code}' http://localhost:8161/api/jolokia/ 2>/dev/null or test manually using a browser. Also verify the jetty.xml or jetty-realm.properties contains a Jolokia servlet mapping.
    Affected if The Jolokia endpoint returns an HTTP 200 response, indicating that Jolokia is enabled and reachable over the network.
  3. Inspect Jolokia security configuration
    Locate the Jolokia configuration in the ActiveMQ conf directory - typically in jetty.xml or a dedicated jolokia-access.xml. Check for the 'policy' or 'security' section. Look for attributes such as 'readonly=true', 'allowedActions', or 'denyList' that restrict ExecHandler and FlightRecorderMXBean access.
    Affected if No restrictive policy is configured, or the configuration allows 'exec' and 'write' actions on MBeans, enabling the attack chain to create recordings and write files.
  4. Verify web console authentication
    Confirm whether the Jolokia endpoint (and entire web console) is protected by authentication. Check conf/jetty.xml for constraint mappings and conf/jetty-users.properties or conf/credentials.properties for defined users. Test by attempting unauthenticated access to /api/jolokia/
    Affected if The Jolokia endpoint is accessible without authentication, or weak/default credentials are in use, allowing an attacker to invoke the malicious MBean methods.

You are affected if your ActiveMQ version is below 5.16.6 or between 5.17.0 and 5.17.4, Jolokia is exposed on the network, and no restrictive Jolokia security policy is configured to block exec and write operations.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 5.16.6 / 5.17.4 or later
Fixed in 5.16.65.17.4
Interim mitigation

Apply restrictive Jolokia configuration (limiting allowed actions) or disable Jolokia entirely. Upgrade to ActiveMQ 5.16.6+, 5.17.4+, 5.18.0+, or 6.0.0 which include hardened Jolokia settings by default.

Recommended fix High confidence

5.16.6, 5.17.4, 5.18.0, or 6.0.0 (or later)

  1. Download Apache ActiveMQ version 5.16.6, 5.17.4, 5.18.0, or 6.0.0 (or later) from the official Apache ActiveMQ distribution
  2. Stop the currently running ActiveMQ instance
  3. Back up your existing ActiveMQ configuration and data directories
  4. Extract the new ActiveMQ distribution to your desired installation path
  5. Migrate any custom configurations from the old installation to the new one (if applicable)
  6. Start the upgraded ActiveMQ instance
  7. Verify the Jolokia endpoint is accessible and the new restrictive configuration is in effect
Caveat Review release notes for version-specific changes; upgrading major versions (e.g., 5.x to 6.x) may introduce breaking changes in configuration or API

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Activemq Scoped from the published advisory
  • Consultation3.0 h
  • Implementation6.0 h
  • Testing5.0 h
  • Review / QA3.0 h
17.0 hours of engineering $2,970
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,752.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2022-41678 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2022-41678 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data