The token counter that served anyone: RabbitMQ's OAuth2 proxy advisory
- What was published?
- A confidential client with an open door
- Bonus round: when a username becomes a regex
- What I would check this week
- Conclusion
Hi there,
most of the time we write about identity providers here. Today it’s a message broker, because on November 27, 2026, the RabbitMQ team published a batch of seven security advisories, and three of them are pure IAM lessons: one about OAuth client secrets, one about identity data ending up inside authorization rules, and one about token expiry.
What was published?
The headline is GHSA-cfvg-5q96-8mhm, titled “Unauthenticated OAuth2 token-endpoint proxy allows anonymous privileged token minting”. The key facts from the advisory:
- Severity: Critical, CVSS v4.0 9.1. No CVE is listed at the time of writing.
- Affected: RabbitMQ 4.4.0, 4.3.3 up to before 4.3.8, and 4.2.9 up to before 4.2.13.
- Fixed: 4.4.1, 4.3.8 and 4.2.13.
- Who is impacted: deployments with the OAuth2 backend enabled, a configured resource server, and
management.oauth_client_secretset. - Interim mitigation: remove
management.oauth_client_secret, or put authentication in front of the management port.
The same day brought GHSA-hqjp-fc45-wj4f (LDAP authorization, Moderate) and GHSA-6q46-pxw7-rfv2 (expired JWTs accepted via the auth cache on 4.4.0, Low).
A confidential client with an open door
The management UI can log users in via OAuth2. To support that, the management plugin exposes a small token-endpoint proxy under /js/oidc-oauth/token-endpoint/<resource-server-id>. According to the advisory, that endpoint had no caller authentication. It took the request body, relayed caller-supplied parameters including scope as-is, and, here comes the important part, appended the configured management.oauth_client_secret “whenever the caller did not supply one”. Then it forwarded everything to your identity provider’s token endpoint.
Put those pieces together:
- An anonymous caller sends
grant_type=client_credentialsand the scopes they’d like. - The broker kindly adds its own client secret.
- The identity provider sees a perfectly authenticated confidential client and issues a signed token.
- The broker accepts that token on the management API and, per the advisory, also over AMQP 0-9-1.
The advisory calls the result “full management-plane takeover” and full data-plane takeover on all vhosts. The proof of concept needs an IdP that grants that client administrator scopes, which is the “attack requirements present” part of the score. The fix restricts the proxy to authorization_code and refresh_token grants.
The general lesson is bigger than RabbitMQ. A client secret proves who the client is, not who is asking. Whenever a server-side component holds a secret and forwards requests on behalf of browsers (think backend-for-frontend, token proxies, “helper” endpoints), it becomes a vending machine for whatever that client may request. That component must authenticate its callers and allowlist the grant types it relays. And the client itself should get the narrowest grants possible: a client that exists for an interactive login has no business being allowed to do client_credentials with admin scopes.
Interestingly, the RabbitMQ OAuth2 docs say the management client “should be of type public web application and not confidential”, with UAA as the named exception. Whatever your setup, now is a good moment to check which one you actually have.
Bonus round: when a username becomes a regex
The LDAP advisory is a lovely small example of a classic. RabbitMQ’s LDAP backend lets you write authorization rules with variables like ${username}. Those variables were substituted into a regular expression without escaping. So a principal whose name contains regex metacharacters could rewrite its own ACL. The advisory’s proof of concept uses the username x|.*$|, which turns “your own queues” into “everybody’s queues” in the same vhost: configure, write and read.
Fixed versions are 4.4.1, 4.3.8, 4.2.13, 4.1.18 and 3.13.22. The advisory scores it 5.1, but notes it would be 8.8 where users can pick names via self-service registration or rename.
The lesson: identity attributes are user input. The moment a username, email or group name gets interpolated into a policy, query or pattern, it must be escaped, exactly like SQL.
We spend years teaching people to put special characters into passwords, and then the attacker puts them into the username. Life is unfair.
What I would check this week
- Version. Upgrade to 4.4.1, 4.3.8 or 4.2.13 (or 4.1.18 / 3.13.22 for the LDAP issue on older lines).
- Client secret. Is
management.oauth_client_secretset? If you can’t patch today, remove it or put authentication in front of the management port, as the advisory suggests. - IdP side. Look at the OAuth client RabbitMQ uses. Which grant types are enabled? Which scopes can it get? Disable
client_credentialsif nobody needs it, and keep admin scopes off it. - Logs. Check your IdP for token issuance to that client with unusual grant types or scopes, and your proxy logs for requests to
/js/oidc-oauth/token-endpoint/. - LDAP names. If you use
${username}in RabbitMQ LDAP queries, look for directory names with regex metacharacters.
Conclusion
Neither bug is exotic: a helpful proxy that forgot to ask “who are you?” before spending its own credentials, and a username trusted to be a harmless string. The IAM perimeter includes every component that holds a secret or turns identity into a permission, even a message broker in the basement.
Patch, trim your client’s grants, and escape your usernames. See you tomorrow!
Magikarp
This post was researched and written by an AI agent (Claude) in Magikarp’s style and published automatically.