/

CVE-2026-67404

Severity:

HIGH RISK

(7.4)

TLS Validation Failure (CWE-295) in RabbitMQ OAuth2

CVE-2026-67404

Analyzed

Vulnerability type

Category:

Improper Certificate Validation

CWE:

CWE-295

Impact:

Authentication Bypass and Unauthorized Access

Severity:

HIGH RISK

(7.4)

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

RabbitMQ can disable TLS certificate verification when no CA bundle is available, allowing an attacker positioned between the broker and the identity provider to forge JWKS responses.

In affected OAuth2 deployments, this may cause the broker to accept attacker-controlled JWTs and grant unauthorized access.

RabbitMQ can disable TLS certificate verification when no CA bundle is available, allowing an attacker positioned between the broker and the identity provider to forge JWKS responses.

In affected OAuth2 deployments, this may cause the broker to accept attacker-controlled JWTs and grant unauthorized access.

Affected context

The issue occurs in RabbitMQ deployments that use the OAuth2 plugin without an explicitly configured CA certificate bundle. If the operating-system CA bundle is empty or unreadable, such as in some minimal container images, the TLS client may fall back to verify_none without warning when retrieving JWKS data.

The issue occurs in RabbitMQ deployments that use the OAuth2 plugin without an explicitly configured CA certificate bundle. If the operating-system CA bundle is empty or unreadable, such as in some minimal container images, the TLS client may fall back to verify_none without warning when retrieving JWKS data.

Exploit preconditions

  • Attack surface: TLS communication between RabbitMQ and the JWKS or OAuth2 identity provider
  • Required access: A network man-in-the-middle position capable of intercepting and modifying the JWKS response
  • Trigger point: JWKS retrieval and JWT validation by the OAuth2 plugin
  • Configuration condition: No cacertfile is configured and the operating-system CA bundle is unavailable or unreadable
  • Why exploitation is possible: Certificate verification is disabled instead of failing closed, allowing forged JWKS data to be trusted
  • Attack surface: TLS communication between RabbitMQ and the JWKS or OAuth2 identity provider
  • Required access: A network man-in-the-middle position capable of intercepting and modifying the JWKS response
  • Trigger point: JWKS retrieval and JWT validation by the OAuth2 plugin
  • Configuration condition: No cacertfile is configured and the operating-system CA bundle is unavailable or unreadable
  • Why exploitation is possible: Certificate verification is disabled instead of failing closed, allowing forged JWKS data to be trusted

Why this happens

The underlying defect is an unsafe fallback in TLS certificate verification. When no trusted CA bundle is available, ssl_options/1 selects verify_none without producing a warning, causing the broker to accept TLS connections without authenticating the remote certificate.

This maps to CWE-295: Improper Certificate Validation, because the security-sensitive connection does not properly validate the peer certificate before trusting identity metadata used for JWT verification.

The underlying defect is an unsafe fallback in TLS certificate verification. When no trusted CA bundle is available, ssl_options/1 selects verify_none without producing a warning, causing the broker to accept TLS connections without authenticating the remote certificate.

This maps to CWE-295: Improper Certificate Validation, because the security-sensitive connection does not properly validate the peer certificate before trusting identity metadata used for JWT verification.

Potential impact

  • An attacker could forge JWKS responses
  • The broker may accept arbitrary attacker-controlled JWTs
  • Unauthorized users could gain access to protected messaging or streaming resources
  • Authentication and authorization boundaries could be bypassed
  • Compromised identities could be used for data access, publication, or administrative actions
  • An attacker could forge JWKS responses
  • The broker may accept arbitrary attacker-controlled JWTs
  • Unauthorized users could gain access to protected messaging or streaming resources
  • Authentication and authorization boundaries could be bypassed
  • Compromised identities could be used for data access, publication, or administrative actions

General mitigation guidance

Mitigation generally focuses on ensuring TLS connections fail closed when certificate trust cannot be established.

Common defensive patterns include:

  • Configure an explicit, readable CA bundle for OAuth2 identity-provider connections
  • Require peer certificate verification rather than permitting verify_none
  • Treat missing, empty, or unreadable trust stores as startup or connection errors
  • Validate the expected identity-provider endpoint and protect JWKS retrieval paths
  • Run brokers with only the permissions and network access required for their role
  • Use container images and runtime policies that provide and preserve trusted CA material

Mitigation generally focuses on ensuring TLS connections fail closed when certificate trust cannot be established.

Common defensive patterns include:

  • Configure an explicit, readable CA bundle for OAuth2 identity-provider connections
  • Require peer certificate verification rather than permitting verify_none
  • Treat missing, empty, or unreadable trust stores as startup or connection errors
  • Validate the expected identity-provider endpoint and protect JWKS retrieval paths
  • Run brokers with only the permissions and network access required for their role
  • Use container images and runtime policies that provide and preserve trusted CA material

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis and configuration checks for verify_none or disabled certificate verification
  • Code review signals involving fallback TLS options when CA files are absent
  • Deployment-policy checks ensuring OAuth2 services define readable CA bundles
  • Runtime monitoring for warnings, failed trust-store loads, or unexpected identity-provider certificates
  • Network security monitoring for altered JWKS responses or TLS interception

Automated configuration and code review tools can help enforce fail-closed TLS policies.

Organizations can look for this weakness through:

  • Static analysis and configuration checks for verify_none or disabled certificate verification
  • Code review signals involving fallback TLS options when CA files are absent
  • Deployment-policy checks ensuring OAuth2 services define readable CA bundles
  • Runtime monitoring for warnings, failed trust-store loads, or unexpected identity-provider certificates
  • Network security monitoring for altered JWKS responses or TLS interception

Automated configuration and code review tools can help enforce fail-closed TLS policies.

Sources

SourceLink
github.comgithub.com/rabbitmq/rabbitmq-server/releases/tag/v4.2.6
github.comgithub.com/rabbitmq/rabbitmq-server/security/advisories/GHSA-37wx-r6q9-6fhj

Frequently asked

questions

Yes, exploitation may be possible remotely when an attacker can obtain a network man-in-the-middle position between RabbitMQ and the OAuth2 identity provider.

The OAuth2 plugin must be enabled, no CA bundle may be configured, and the operating-system CA bundle must be empty or unreadable. The attacker must also be able to intercept and alter the JWKS response.

Configure a valid trusted CA bundle and require certificate verification to fail closed when trust material is unavailable.

Enforce TLS verification through secure defaults, validate trust-store availability during deployment, and continuously audit broker and container configurations for disabled certificate checking.

Yes, exploitation may be possible remotely when an attacker can obtain a network man-in-the-middle position between RabbitMQ and the OAuth2 identity provider.

The OAuth2 plugin must be enabled, no CA bundle may be configured, and the operating-system CA bundle must be empty or unreadable. The attacker must also be able to intercept and alter the JWKS response.

Configure a valid trusted CA bundle and require certificate verification to fail closed when trust material is unavailable.

Enforce TLS verification through secure defaults, validate trust-store availability during deployment, and continuously audit broker and container configurations for disabled certificate checking.

Find out what's already
exploitable in your codebase.