Improper input validation and improper control of code generation allow for code injection. The software exposes the Jolokia JMX-HTTP bridge at the '/api/jolokia/' endpoint. The default access policy permits execution operations on ActiveMQ MBeans, specifically the `BrokerService.addNetworkConnector(String)` and `BrokerService.addConnector(String)` functions. An authenticated attacker can use a crafted discovery URI, such as `masterslave:vm://...,...` or `static:vm://...`, to trigger the `brokerConfig` parameter of the VM transport. This causes the `ResourceXmlApplicationContext` to load a remote Spring XML application context. Since singleton beans are instantiated before configuration validation, arbitrary code can be executed on the broker's JVM via bean factory methods like `Runtime.exec()`.