Saltar al contenido
Fali Fuentes

RabbitMQ allows admin tokens without credentials via OAuth2: patch now or audit

Leer este artículo en español

The advisory GHSA-cfvg-5q96-8mhm published on November 27 reveals that the endpoint /js/oidc-oauth/token-endpoint/<resource-server-id> of the plugin rabbitmq_management is registered without authentication context and does not implement is_authorized/3. Any attacker with access to the management port (15672/15671) can make POST grant_type=client_credentials and receive a JWT signed by the identity provider with attacker-chosen scopes, including administrator. The token works in both the Management API and the AMQP 0-9-1 listener via SASL PLAIN, giving full control over all vhosts.

Only affects if you use OAuth2 in the management console

The vulnerability requires the documented OAuth2/SSO integration to be active: management.oauth_enabled = true, management.oauth_client_secret configured and the backend oauth2 enabled. If you don’t use OAuth2 for the management UI, you aren’t vulnerable to this CVE, but you are to the other six advisories published the same day (CSRF High, two Medium, three Low). Coverage from The Hacker News confirms that the vulnerable proxy was introduced in 4.3.3 in July to fix OAuth2 logins in Safari.

Patched versions already available since November 16

The patched binaries 4.4.1 and 4.3.8 were published on November 16, eleven days before the public advisory. Anyone who applied their monthly patching routine that day is already protected unknowingly. The branch 4.2.x only receives the fix 4.2.13 in Broadcom’s Enterprise channel; there will be no backported patch for the community. If you’re on 4.2 community and can’t migrate to 4.3/4.4, the only real mitigation is to remove the secret or harden the management port.

CVSS 9.1 v4 versus 9.8 v3.1: how to prioritize it

The GitHub advisory uses CVSS v4 9.1; the researcher proposes CVSS v3.1 9.8. The difference lies in whether the precondition «OAuth2 configured» is considered part of the vector. For internal prioritization, treat it as 9.8 if your environment uses OAuth2 in the console. No known exploitation in campaigns as of November 30 per the advisory and CISA KEV, but the researcher’s PoC shanz0ng demonstrates the full chain in the official image rabbitmq:4.4.0-management: token minting → persistent admin account creation → cross-vhost AMQP authentication.

The patch does not remove admin accounts created via exploit

After updating, you must audit manually: list users administrator with rabbitmqctl list_users, review the IdP logs from the last 30 days for anomalous token issuances client_credentials or password from the broker’s IP, and look for unexplained activity in queues and vhosts (purges, publishes not correlated with deployments). There is no official automated tool for this forensic cleanup.

Immediate mitigation if you cannot patch yet

  • Remove management.oauth_client_secret in rabbitmq.conf — breaks the documented OAuth2 flow; some IdPs require it for login/refresh.
  • Place authentication in front of the management port (reverse proxy with mTLS, VPN, IP allowlist, Basic Auth, OAuth2 Proxy, Pomerium, Authelia) — does not protect against an attacker already inside the management network (insider, pivot).

After patching and auditing, rotate management.oauth_client_secret and the OAuth2 client credentials in the IdP; requires coordination with the identity team and possible SSO downtime. Use the same window to review the other six advisories from November 27, especially the High CSRF in the Management API (affects 4.1.x and 3.13.x; fixed in 4.1.18 and 3.13.22). If you use OAuth2 token cache, enable rabbitmq_auth_backend_cache with a short TTL (≤ 5 min) to mitigate the separate advisory GHSA-6Q46-PXW7-RFV2 (cache accepts expired JWTs), assuming the extra latency on each request to the Management API.

SYSTEM_EXPERT
Rafael Fuentes – BIO

I am a seasoned cybersecurity expert with over twenty years of experience leading strategic projects in the industry. Throughout my career, I have specialized in comprehensive cybersecurity risk management, advanced data protection, and effective incident response. I hold a certification in Industrial Cybersecurity, which has provided me with deep expertise in compliance with critical cybersecurity regulations and standards. My experience includes the implementation of robust security policies tailored to the specific needs of each organization, ensuring a secure and resilient digital environment.

Share
Scroll al inicio