{"id":"CVE-2026-63336","aliases":["CVE-2026-63336","GHSA-5m9f-rphj-c435"],"related":[],"kind":"vulnerability","state":"published","title":"RabbitMQ Java client: TrustEverythingTrustManager used by default in useSslProtocol() enables MITM","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Vulnerability Summary\n\n`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.\n\n## Affected Components\n\n- `com.rabbitmq.client.TrustEverythingTrustManager` — accepts any certificate\n- `com.rabbitmq.client.ConnectionFactory.useSslProtocol()` — uses TrustEverythingTrustManager\n- Hostname verification disabled by default (`enableHostnameVerification()` must be called explicitly)\n- `com.rabbitmq.client.ConnectionFactory.getPassword()` — returns plaintext with no redaction\n- Default port 5672 (plaintext) with PLAIN SASL — credentials sent unencrypted\n\n## POC (Verified on Java 21, amqp-client 5.25.0)\n\n```java\n// TrustEverythingTrustManager accepts ANY certificate including null\nTrustEverythingTrustManager tm = new TrustEverythingTrustManager();\ntm.checkServerTrusted(null, \"RSA\");  // No exception — accepts null cert chain\ntm.getAcceptedIssuers();  // Returns empty array — trusts all CAs\n\n// ConnectionFactory defaults\nConnectionFactory factory = new ConnectionFactory();\nfactory.useSslProtocol();  // Uses TrustEverythingTrustManager internally\n// enableHostnameVerification() NOT called by default\n\n// Credential exposure\nfactory.setPassword(\"secret_password_123\");\nfactory.getPassword();  // Returns \"secret_password_123\" — no redaction\n\n// Default plaintext port\nfactory.getPort();  // 5672 (plaintext, not 5671/TLS)\n\n// PLAIN SASL sends cleartext credentials\nPlainMechanism pm = new PlainMechanism();\n// handleChallenge() sends username+password in cleartext\n```\n\n## Attack Scenarios\n\n1. **MITM**: Attacker presents self-signed cert → `TrustEverythingTrustManager` accepts it → all RabbitMQ traffic intercepted\n2. **Credential theft**: Default plaintext port (5672) + PLAIN SASL = credentials readable on network\n3. **DNS rebinding**: No hostname verification → attacker DNS record → MITM without cert\n4. **Logging exposure**: `getPassword()` returns plaintext → credentials in logs/stack traces\n\n## Suggested Fix\n1. Deprecate `TrustEverythingTrustManager` — it should never be used in production\n2. `useSslProtocol()` should use the JVM default trust store, not TrustEverything\n3. Enable hostname verification by default\n4. Redact password in `getPassword()` or remove the public getter\n5. Warn when using PLAIN SASL without TLS","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-08-18T16:29:23.115Z","modified":"2026-10-22T22:10:00.250Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":5.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"MEDIUM"}],"cwes":["CWE-295"],"affected":[{"ranges":[{"version":"< 5.33.0","status":"affected"}],"vendor":"rabbitmq","product":"rabbitmq-java-client","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.33.0"}],"ecosystem":"Maven","package":"com.rabbitmq:amqp-client","purl":"pkg:maven/com.rabbitmq/amqp-client","source":"ghsa"}],"references":[{"url":"https://github.com/rabbitmq/rabbitmq-java-client/security/advisories/GHSA-5m9f-rphj-c435","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rabbitmq/rabbitmq-java-client/pull/1999","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rabbitmq/rabbitmq-java-client/pull/2001","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rabbitmq/rabbitmq-java-client/commit/1e7deb2e6020c9793a81385a53ea378ec63b9339","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rabbitmq/rabbitmq-java-client/commit/a4bf571dd368765baaa9cecfae68ce09f1bdcc01","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rabbitmq/rabbitmq-java-client/releases/tag/v5.33.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rabbitmq/rabbitmq-java-client","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-08-18T17:30:07.570Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-63336","url":"https://www.cve.org/CVERecord?id=CVE-2026-63336","licence":"CVE Terms of Use","modified":"2026-08-18T17:34:30.102Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5m9f-rphj-c435","url":"https://github.com/advisories/GHSA-5m9f-rphj-c435","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:13.150Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-63336","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63336","licence":"Public domain","modified":"2026-10-22T22:10:00.250Z"}],"updatedAt":"2026-11-25T22:59:33.525Z","epss":{"score":0.00182,"percentile":0.08114,"date":"2026-12-01T12:00:22.000Z"}}