CVE-2026-40466: CWE-20 Improper Input Validation in Apache Software Foundation Apache ActiveMQ Broker
Improper Input Validation, Improper Control of Generation of Code ('Code Injection') vulnerability in Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ. An authenticated attacker may bypass the fix in CVE-2026-34197 by adding a connector using an HTTP Discovery transport via BrokerView.addNetworkConnector or BrokerView.addConnector through Jolokia if the activemq-http module is on the classpath. A malicious HTTP endpoint can return a VM transport through the HTTP URI which will bypass the validation added in CVE-2026-34197. The attacker can then use the VM transport's brokerConfig parameter to load a remote Spring XML application context using ResourceXmlApplicationContext. Because Spring's ResourceXmlApplicationContext instantiates all singleton beans before the BrokerService validates the configuration, arbitrary code execution occurs on the broker's JVM through bean factory methods such as Runtime.exec(). This issue affects Apache ActiveMQ Broker: before 5.19.6, from 6.0.0 before 6.2.5; Apache ActiveMQ All: before 5.19.6, from 6.0.0 before 6.2.5; Apache ActiveMQ: before 5.19.6, from 6.0.0 before 6.2.5. Users are recommended to upgrade to version 5.19.6 or 6.2.5, which fixes the issue.
AI Analysis
Technical Summary
This vulnerability involves improper input validation and control of code generation in Apache ActiveMQ Broker. An authenticated attacker can bypass the fix from CVE-2026-34197 by adding a connector using an HTTP Discovery transport through Jolokia if the activemq-http module is on the classpath. A malicious HTTP endpoint can return a VM transport via the HTTP URI, bypassing prior validation. The attacker can exploit the VM transport's brokerConfig parameter to load a remote Spring XML application context using ResourceXmlApplicationContext. Since Spring instantiates singleton beans before BrokerService validates the configuration, this leads to arbitrary code execution on the broker JVM via bean factory methods such as Runtime.exec(). The affected versions are Apache ActiveMQ Broker and Apache ActiveMQ All before 5.19.6, and from 6.0.0 before 6.2.5. The vulnerability has a CVSS 3.1 score of 8.8 (high severity).
Potential Impact
Successful exploitation allows an authenticated attacker to execute arbitrary code on the broker's JVM, potentially compromising the system running Apache ActiveMQ Broker. This can lead to full control over the broker process and associated resources, impacting confidentiality, integrity, and availability.
Mitigation Recommendations
A fix is available. Users should upgrade Apache ActiveMQ Broker to version 5.19.6 or 6.2.5 or later, which address this vulnerability. There is no indication from the vendor advisory that alternative mitigations or temporary fixes are available or recommended. Patch status is confirmed by the vendor advisory.
CVE-2026-40466: CWE-20 Improper Input Validation in Apache Software Foundation Apache ActiveMQ Broker
Description
Improper Input Validation, Improper Control of Generation of Code ('Code Injection') vulnerability in Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ. An authenticated attacker may bypass the fix in CVE-2026-34197 by adding a connector using an HTTP Discovery transport via BrokerView.addNetworkConnector or BrokerView.addConnector through Jolokia if the activemq-http module is on the classpath. A malicious HTTP endpoint can return a VM transport through the HTTP URI which will bypass the validation added in CVE-2026-34197. The attacker can then use the VM transport's brokerConfig parameter to load a remote Spring XML application context using ResourceXmlApplicationContext. Because Spring's ResourceXmlApplicationContext instantiates all singleton beans before the BrokerService validates the configuration, arbitrary code execution occurs on the broker's JVM through bean factory methods such as Runtime.exec(). This issue affects Apache ActiveMQ Broker: before 5.19.6, from 6.0.0 before 6.2.5; Apache ActiveMQ All: before 5.19.6, from 6.0.0 before 6.2.5; Apache ActiveMQ: before 5.19.6, from 6.0.0 before 6.2.5. Users are recommended to upgrade to version 5.19.6 or 6.2.5, which fixes the issue.
CVSS v3.1
Score 8.8high
Affected software
pkg:maven/org.apache.activemq/activemq-brokerRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability involves improper input validation and control of code generation in Apache ActiveMQ Broker. An authenticated attacker can bypass the fix from CVE-2026-34197 by adding a connector using an HTTP Discovery transport through Jolokia if the activemq-http module is on the classpath. A malicious HTTP endpoint can return a VM transport via the HTTP URI, bypassing prior validation. The attacker can exploit the VM transport's brokerConfig parameter to load a remote Spring XML application context using ResourceXmlApplicationContext. Since Spring instantiates singleton beans before BrokerService validates the configuration, this leads to arbitrary code execution on the broker JVM via bean factory methods such as Runtime.exec(). The affected versions are Apache ActiveMQ Broker and Apache ActiveMQ All before 5.19.6, and from 6.0.0 before 6.2.5. The vulnerability has a CVSS 3.1 score of 8.8 (high severity).
Potential Impact
Successful exploitation allows an authenticated attacker to execute arbitrary code on the broker's JVM, potentially compromising the system running Apache ActiveMQ Broker. This can lead to full control over the broker process and associated resources, impacting confidentiality, integrity, and availability.
Mitigation Recommendations
A fix is available. Users should upgrade Apache ActiveMQ Broker to version 5.19.6 or 6.2.5 or later, which address this vulnerability. There is no indication from the vendor advisory that alternative mitigations or temporary fixes are available or recommended. Patch status is confirmed by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- apache
- Date Reserved
- 2026-04-13T13:38:42.111Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-40466","vendor":"Red Hat"}]
Threat ID: 69eb479387115cfb681fd00b
Added to database: 04/24/2026, 10:36:03 UTC
Last enriched: 07/15/2026, 09:11:09 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 2571
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.