Improper input validation and improper control of code generation lead to a code injection issue. Apache ActiveMQ Classic exposes the Jolokia JMX-HTTP bridge at the '/api/jolokia/' endpoint on the web console. The default access policy allows execution operations on all ActiveMQ MBeans, specifically the `addNetworkConnector(String)` function within `BrokerService`. An authenticated attacker can use a crafted discovery URI to trigger the `brokerConfig` parameter of the VM transport via a "masterslave://" URL. This allows the loading of a Spring XML application context using `ResourceXmlApplicationContext`. Since this context instantiates singleton beans before the configuration is validated, arbitrary code can be executed on the broker's JVM through bean factory methods such as `Runtime.exec()`.