/

CVE-2026-57219

Severity:

HIGH RISK

(7.5)

OAuth Client Secret Disclosure (CWE-200) in RabbitMQ

CVE-2026-57219

Analyzed

Vulnerability type

Category:

Information Disclosure

CWE:

CWE-200, CWE-522

Impact:

Credential Exposure and Unauthorized Access

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

An obsolete RabbitMQ management API endpoint can expose the configured OAuth 2 client secret to unauthenticated HTTP callers when certain management and OAuth settings are enabled.

When reachable over the network, this disclosure allows an attacker to obtain credentials that may be reused against external identity providers or other integrated systems.

Affected context

This vulnerability appears in RabbitMQ deployments with the management plugin enabled and configured for OAuth 2 using the management.oauth_client_secret setting.

It manifests specifically when the legacy GET /api/auth endpoint remains accessible in the management HTTP API.

Environments where the management interface is exposed beyond tightly controlled administrative networks are more likely to be at risk, especially if TLS termination, authentication, or network-layer filtering are not strictly enforced.

Exploit preconditions

  • Attack surface: RabbitMQ Management HTTP API (GET /api/auth endpoint)
  • Required access: Network access to the management interface; no authentication required under vulnerable configurations
  • Trigger point: An HTTP GET request to the obsolete /api/auth endpoint while management.oauth_client_secret is configured
  • Why exploitation is possible: The endpoint returns sensitive configuration data, including the OAuth client secret, without enforcing proper authorization or redaction of credentials

Why this happens

The underlying issue is the exposure of sensitive configuration values through an administrative API that does not enforce adequate access control or data minimization.

This maps to CWE-200: Exposure of Sensitive Information to an Unauthorized Actor and relates to CWE-522: Insufficiently Protected Credentials, because the OAuth client secret is treated as ordinary configuration and returned in clear form.

Conceptually, an obsolete or low-visibility endpoint continued to serialize internal settings, including credential material, without aligning with current authentication and authorization requirements or ensuring least-privilege data return.

Potential impact

  • Attackers can obtain the OAuth 2 client secret configured for RabbitMQ management integration
  • Compromised client secrets may allow unauthorized access or impersonation against associated identity providers or authorization servers
  • Misuse of exposed credentials can lead to broader account compromise in connected services or management consoles
  • Increased risk of lateral movement if the same client secret or related credentials are reused across environments

General mitigation guidance

Effective mitigation centers on restricting exposure of management interfaces and treating secrets as highly sensitive configuration.

Pattern-based defensive measures include:

  • Ensuring that management and administrative APIs require strong authentication and authorization by default
  • Avoiding endpoints that serialize or echo back full configuration objects, especially fields containing credentials or tokens
  • Isolating management surfaces to hardened administrative networks, using strict firewall rules and TLS
  • Centralizing secret storage in dedicated secret management systems and limiting where secrets are present in application responses or logs
  • Applying least-privilege principles so that even authenticated callers receive only the minimal configuration data necessary for their role

How teams detect issues like this

High-level detection approaches can focus on both code and runtime behavior:

  • Static analysis and code review to identify API handlers that return configuration objects or serialize sensitive fields like client secrets, tokens, or passwords
  • Security review of management and diagnostic endpoints to confirm they enforce authentication and do not leak secrets in responses
  • HTTP traffic inspection and logging analysis to search for responses that contain known secret patterns or OAuth configuration parameters
  • Policy-based controls that flag any new or legacy endpoints exposing credential-related fields, backed by automated API contract checks

Sources

SourceLink
github.comgithub.com/rabbitmq/rabbitmq-server/commit/98b1daf740237c85941e8addcbea6e74f4a2743c
github.comgithub.com/rabbitmq/rabbitmq-server/commit/aa387c4451e7b674df3e3ba89df86a99d697cc7f
github.comgithub.com/rabbitmq/rabbitmq-server/pull/16083
github.comgithub.com/rabbitmq/rabbitmq-server/pull/16086
github.comgithub.com/rabbitmq/rabbitmq-server/releases/tag/v4.2.6
github.comgithub.com/rabbitmq/rabbitmq-server/security/advisories/GHSA-pj24-8j6m-vq9q

Frequently asked

questions

Exploitability depends on how the RabbitMQ management interface is exposed. If the vulnerable endpoint is reachable from untrusted networks and not protected by authentication or network controls, attackers can query it directly and obtain the OAuth client secret.

An attacker only needs network access to the management HTTP API. Under affected configurations, no prior authentication is necessary to invoke the obsolete /api/auth endpoint and receive the secret.

The safest pattern is to remove or harden endpoints that expose configuration, require strong authentication and authorization for all management operations, and ensure secrets are never included in API responses or diagnostic outputs.

Prevention involves designing management APIs with least-privilege data exposure, centralizing secrets in dedicated secret stores, enforcing strict access control and network isolation around administrative surfaces, and incorporating security-focused code review and automated checks for credential leakage.

Find out what's already
exploitable in your codebase.