The vulnerability allowed users with send or consume permissions on a STOMP address to alter its routing-type, an action that should require the createAddress permission. The root cause was in the STOMP protocol implementation, which had its own logic for auto-creating and updating addresses.
The analysis of the patch 53173375c4d5e4b57890e89d37ed8b666c974474 reveals that the method org.apache.activemq.artemis.core.protocol.stomp.StompConnection.autoCreateDestinationIfPossible contained the flawed logic. This method would add a new routing-type to an existing address if the user-provided type was not already supported, without verifying if the user had createAddress permission.
This vulnerable method was called from two places:
org.apache.activemq.artemis.core.protocol.stomp.VersionedStompFrameHandler.onSend when a client sent a message (requiring send permission).
org.apache.activemq.artemis.core.protocol.stomp.StompConnection.subscribe when a client subscribed to a destination (requiring consume permission).
The fix refactored the code to remove the custom, insecure implementation and instead use the centralized ServerSession.checkAutoCreate method, which correctly enforces security permissions. Therefore, the identified functions are the ones that would appear in a runtime profile when the vulnerability is exploited, either by sending a message or subscribing with a crafted STOMP frame specifying a different routing type.