Spring STOMP broker relay needs authorization at the broker, too
Spring Framework's STOMP broker relay can forward commands that the application's message authorization rules would deny. CVE-2026-59391 affects applications that use the relay with an external STOMP broker and depend on Spring Security to restrict destinations.
The architectural mistake
Spring Security can decide whether an authenticated user may send to or subscribe from a destination. When an external broker receives a crafted sequence of STOMP frames, it may process a command outside the application's intended authorization sequence. The result is potential access to a restricted destination for sending or receiving messages.
The advisory rates the issue medium and requires an authenticated user. That does not make it harmless. Message channels often carry tenant data, workflow commands, and application control messages. A destination restriction is an authorization boundary even when it is expressed as a broker route instead of an HTTP endpoint.
Affected versions
The affected Spring Framework ranges are 7.0.0 through 7.0.10, 6.2.0 through 6.2.20, 6.1.0 through 6.1.29, 6.0.0 through 6.0.32, 5.3.0 through 5.3.50, and 5.2.26.RELEASE and earlier. Spring names 7.0.11 as the open-source fixed release and gives enterprise-only versions for the older branches.
Defense in depth
Upgrade first. Then verify that the external broker enforces its own destination authorization. A gateway check alone assumes every STOMP frame reaches it in the same order and shape the application expects. The broker sees a different trust and parsing boundary.
Review the relay configuration for the broker host, credentials, virtual host, and destination mappings. Confirm that application credentials cannot publish to administrative or cross-tenant destinations. If the broker supports ACLs, keep the rules in source control and test them with the same identities used by the application.
Observe STOMP traffic at both sides of the relay during a controlled test. Compare the destination the client requested with the destination the broker processed. Reject unexpected frame sequences rather than only logging them.
Recovery and verification
- Patch every Spring Framework service that uses a broker relay.
- Confirm broker-side authorization does not rely solely on Spring Security destination matchers.
- Test send and subscribe permissions with low-privilege, tenant, and administrative identities.
- Review message-access logs for destinations outside a user's expected scope.
- Rotate broker credentials if you find unexplained publishing or subscription activity.
The fix closes the known frame path, but the broker remains part of the authorization system. Treat its ACLs and the application mapping as one decision.
Top comments (0)