CVE-2026-63336
RabbitMQ Java client: TrustEverythingTrustManager used by default in useSslProtocol() enables MITM
Description
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
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| com.rabbitmq » amqp-client | < 5.33.0 | 5.33.0 |
Blast radius
72% of the dependent artifacts (5,652) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 22,148 |
| 2 hops | 75,867 |
| 3 hops | 115,218 |
| 4 hops | 65,893 |
| 5 hops | 29,945 |
| 6 hops | 15,538 |
Most used dependents
- org.apache.spark » spark-sql3,174 usages
- org.apache.spark » spark-core2,899 usages
- org.apache.spark » spark-mllib831 usages
- org.apache.hive » hive-exec699 usages
- org.springframework.boot » spring-boot-starter-amqp691 usages
- org.apache.spark » spark-streaming670 usages
- org.apache.spark » spark-hive633 usages
- org.apache.camel.springboot » camel-core-starter558 usages
- org.nuxeo.ecm.core » nuxeo-core-api534 usages
- org.apache.spark » spark-catalyst502 usages
- org.apache.solr » solr-core500 usages
- org.apache.hive » hive-metastore480 usages
- org.apache.camel.springboot » camel-spring-boot-starter478 usages
- org.apache.synapse » synapse-core453 usages
- org.springframework.amqp » spring-rabbit405 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
- Webhttps://github.com/rabbitmq/rabbitmq-java-client/security/advisories/GHSA-5m9f-rphj-c435
- Webhttps://github.com/rabbitmq/rabbitmq-java-client/pull/1999
- Webhttps://github.com/rabbitmq/rabbitmq-java-client/pull/2001
- Webhttps://github.com/rabbitmq/rabbitmq-java-client/commit/1e7deb2e6020c9793a81385a53ea378ec63b9339
- Webhttps://github.com/rabbitmq/rabbitmq-java-client/commit/a4bf571dd368765baaa9cecfae68ce09f1bdcc01
- Packagehttps://github.com/rabbitmq/rabbitmq-java-client
- Webhttps://github.com/rabbitmq/rabbitmq-java-client/releases/tag/v5.33.0
