5.1medium
RabbitMQ Java client: TrustEverythingTrustManager used by default in useSslProtocol() enables MITM
- Severity
- 5.1medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.18% (higher than 8% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-5m9f-rphj-c435
Description
The RabbitMQ Java client library allows Java and JVM-based applications to connect to and interact with RabbitMQ nodes. Prior to 5.33.0, com.rabbitmq.client.ConnectionFactory.useSslProtocol() and ConnectionFactory.useSslProtocol(String) configure com.rabbitmq.client.TrustEverythingTrustManager and leave hostname verification disabled, causing arbitrary server certificates, including self-signed certificates, to be accepted. A network attacker able to intercept a TLS connection can impersonate the RabbitMQ broker, read protected AMQP traffic, and modify traffic without certificate or hostname validation. The fix changes the production TLS helpers to use the JVM default trust store and enables hostname verification, while retaining an explicitly named development-only no-verification helper. This issue is fixed in version 5.33.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| rabbitmq rabbitmq-java-client | < 5.33.0 | CVE List |
| com.rabbitmq:amqp-client (Maven) | before 5.33.0 | GitHub Advisory Database |
All scores
| GitHub_M | 5.1medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
The RabbitMQ Java client library allows Java and JVM-based applications to connect to and interact with RabbitMQ nodes. Prior to 5.33.0, com.rabbitmq.client.ConnectionFactory.useSslProtocol() and ConnectionFactory.useSslProtocol(String) configure com.rabbitmq.client.TrustEverythingTrustManager and leave hostname verification disabled, causing arbitrary server certificates, including self-signed certificates, to be accepted. A network attacker able to intercept a TLS connection can impersonate the RabbitMQ broker, read protected AMQP traffic, and modify traffic without certificate or hostname validation. The fix changes the production TLS helpers to use the JVM default trust store and enables hostname verification, while retaining an explicitly named development-only no-verification helper. This issue is fixed in version 5.33.0.
GitHub Advisory Database
Vulnerability Summary
com.rabbitmq.client.TrustEverythingTrustManager accepts ANY TLS certificate (including null chains) and is used as the default trust manager when calling ConnectionFactory.useSslProtocol() without arguments. Combined with hostname verification being disabled by default, this enables trivial man-in-the-middle attacks.
Affected Components
com.rabbitmq.client.TrustEverythingTrustManager— accepts any certificatecom.rabbitmq.client.ConnectionFactory.useSslProtocol()— uses TrustEverythingTrustManager- Hostname verification disabled by default (
enableHostnameVerification()must be called explicitly) com.rabbitmq.client.ConnectionFactory.getPassword()— returns plaintext with no redaction- Default port 5672 (plaintext) with PLAIN SASL — credentials sent unencrypted
POC (Verified on Java 21, amqp-client 5.25.0)
// TrustEverythingTrustManager accepts ANY certificate including null
TrustEverythingTrustManager tm = new TrustEverythingTrustManager();
tm.checkServerTrusted(null, "RSA"); // No exception — accepts null cert chain
tm.getAcceptedIssuers(); // Returns empty array — trusts all CAs
// ConnectionFactory defaults
ConnectionFactory factory = new ConnectionFactory();
factory.useSslProtocol(); // Uses TrustEverythingTrustManager internally
// enableHostnameVerification() NOT called by default
// Credential exposure
factory.setPassword("secret_password_123");
factory.getPassword(); // Returns "secret_password_123" — no redaction
// Default plaintext port
factory.getPort(); // 5672 (plaintext, not 5671/TLS)
// PLAIN SASL sends cleartext credentials
PlainMechanism pm = new PlainMechanism();
// handleChallenge() sends username+password in cleartext
Attack Scenarios
- MITM: Attacker presents self-signed cert →
TrustEverythingTrustManageraccepts it → all RabbitMQ traffic intercepted - Credential theft: Default plaintext port (5672) + PLAIN SASL = credentials readable on network
- DNS rebinding: No hostname verification → attacker DNS record → MITM without cert
- Logging exposure:
getPassword()returns plaintext → credentials in logs/stack traces
Suggested Fix
- Deprecate
TrustEverythingTrustManager— it should never be used in production useSslProtocol()should use the JVM default trust store, not TrustEverything- Enable hostname verification by default
- Redact password in
getPassword()or remove the public getter - Warn when using PLAIN SASL without TLS
NVD (es)
La biblioteca cliente Java de RabbitMQ permite a las aplicaciones Java y basadas en JVM conectarse e interactuar con nodos RabbitMQ. Antes de la versión 5.33.0, com.rabbitmq.client.ConnectionFactory.useSslProtocol() y ConnectionFactory.useSslProtocol(String) configuran com.rabbitmq.client.TrustEverythingTrustManager y dejan la verificación de nombre de host deshabilitada, lo que provoca que se acepten certificados de servidor arbitrarios, incluidos los certificados autofirmados. Un atacante de red capaz de interceptar una conexión TLS puede suplantar al intermediario de RabbitMQ, leer tráfico AMQP protegido y modificar el tráfico sin validación de certificado o nombre de host. La solución cambia los ayudantes TLS de producción para usar el almacén de confianza predeterminado de la JVM y habilita la verificación de nombre de host, mientras retiene un ayudante de no verificación explícitamente nombrado y solo para desarrollo. Este problema está solucionado en la versión 5.33.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-63336 changed 2026-08-18 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-5m9f-rphj-c435 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-63336 changed 2026-10-22 | Public domain |