Medium

RabbitMQ Java client: TrustEverythingTrustManager used by default in useSslProtocol() enables MITM

  • Disclosed: 18.08.2026
  • Updated: 11.10.2026 13:20

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 certificate
  • com.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)

java
// 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

  1. MITM: Attacker presents self-signed cert → TrustEverythingTrustManager accepts it → all RabbitMQ traffic intercepted
  2. Credential theft: Default plaintext port (5672) + PLAIN SASL = credentials readable on network
  3. DNS rebinding: No hostname verification → attacker DNS record → MITM without cert
  4. Logging exposure: getPassword() returns plaintext → credentials in logs/stack traces

Suggested Fix

  1. Deprecate TrustEverythingTrustManager — it should never be used in production
  2. useSslProtocol() should use the JVM default trust store, not TrustEverything
  3. Enable hostname verification by default
  4. Redact password in getPassword() or remove the public getter
  5. Warn when using PLAIN SASL without TLS

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) com.rabbitmq:amqp-client < 5.33.0 5.33.0

References

CVSS score -
CVSS vector
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
Weakness (CWE)
CWE-295
Platform
Java / Kotlin (Maven)
Package
com.rabbitmq:amqp-client
Disclosed
18.08.2026
Updated
11.10.2026 13:20

Sources and licenses

OSV / GitHub Advisory Database - GHSA-5m9f-rphj-c435 - CC BY 4.0

Vulnerability history: com.rabbitmq:amqp-client

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (12) in the archive
Total entries
12
First → latest
10.2018 10.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 4
  • Medium 7
  • Low 1

Disclosures per year

  1. 2018: 1
  2. 2019: 0
  3. 2020: 0
  4. 2021: 0
  5. 2022: 0
  6. 2023: 1
  7. 2024: 0
  8. 2025: 0
  9. 2026: 10
Severity:
  1. RabbitMQ Java client: TrustEverythingTrustManager used by default in useSslProtocol() enables MITM this entry
    Medium CVE-2026-63336 < 5.33.0 5.33.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.