On this page

Atomicorp WAF Research Note: CVE-2022-41678

Apache ActiveMQ < 5.16.5/5.17.3 - Remote Code Execution

CVE Details

Status: Attack Blocked by Atomicorp
Technical CPE data

This section lists vulnerable CPE matches retained from the NVD configurations. It supplements the readable affected-product information above.

  • cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:*
    • Version end (exclusive): 5.16.6
    • NVD match criteria ID: 2CD766F1-F0C9-4CFE-85F5-308248C6E44C
  • cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:*
    • Version start (inclusive): 5.17.0
    • Version end (exclusive): 5.17.4
    • NVD match criteria ID: B0D4F2D0-6707-47EA-BE24-D1B273EF5122

Vulnerability Description

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.

  1. Maintain the observed Atomicorp protections. Keep your Atomicorp commercial rules current and confirm that the selected observed rules (330925 ) have not been locally disabled. Atomicorp commercial rules are enabled by default. If you use Atomic WAF, review the applicable policy and rule settings.

  2. Apply the vendor’s remediation. WAF protection is defense in depth and does not replace upgrading or following the affected vendor’s guidance.

    • Affected versions: Apache Software Foundation Apache ActiveMQ versions earlier than 5.16.6.
    • Affected versions: Apache Software Foundation Apache ActiveMQ versions earlier than 5.17.4.
    • Versions reported unaffected: Apache Software Foundation Apache ActiveMQ version 5.18.0.
    • Versions reported unaffected: Apache Software Foundation Apache ActiveMQ version 6.0.0.
    • No specific CNA/vendor solution or workaround is included in the current CVE Record (opens in a new tab) . Review the vendor’s security advisories and supported-release guidance before making changes.
  3. Validate after changes. Confirm rule updates are current, review WAF events for the affected application, and test application behavior after vendor upgrades, mitigations, or local policy changes.

Research Notes

Atomicorp WAF protections are designed around attack techniques and exploit behaviors, allowing existing protections to apply across multiple vulnerabilities without requiring a unique rule for every CVE.

Public Vulnerability References

Test or Research Source

Research Note Context

This research note documents exploit-technique analysis associated with this vulnerability and references Atomicorp WAF protections observed during engineering review, testing, or validation activities.

Atomicorp security controls are generally designed to identify and mitigate attack techniques and exploit behaviors rather than individual CVE identifiers. As a result, protections developed for one vulnerability may also apply to related attack variants and future vulnerabilities using similar techniques.

Learn More

Atomicorp develops commercially supported security technologies for web applications, servers, endpoints, workloads, and legacy enterprise platforms.

Organizations interested in protecting systems against exploit techniques associated with vulnerabilities such as this one can learn more about:

  • Atomic ModSecurity Rules: commercially maintained WAF rules for ModSecurity deployments, including protections for web attacks, bots, scanners, malware, exploitation attempts, and emerging vulnerability classes.
  • Atomic WAF: an enterprise web application firewall with Atomicorp rules, centralized management, reporting, authentication controls, and operational tooling.
  • Atomic ModSecurity Integrator: a special licensing option for MSPs, MSSPs, OEMs, VARs, reverse proxy providers, and other integrators who want to incorporate Atomicorp ModSecurity rule technology into their own products or services.
  • Atomic OSSEC: an enterprise OSSEC-based intrusion detection, compliance, and security monitoring platform.
  • Atomic Protector: workload protection for Linux, web, cloud, data center, and hybrid environments.

For additional information, product evaluations, or technical discussions, visit https://www.atomicorp.com/ or https://modsecurity.io/ (opens in a new tab) .