RubySec

Providing security resources for the Ruby community

GHSA-499w-x7r4-fw7p (amq-protocol): TLS certificate verification disabled by default for amqps:// URIs

TLS certificate verification disabled by default for amqps:// URIs

Published: November 02, 2026

SECURITY IDENTIFIERS

GEM

amq-protocol

SEVERITY

CVSS v3.x: 7.4 (High)

UNAFFECTED VERSIONS

< 2.3.0

PATCHED VERSIONS

>= 2.10.0

DESCRIPTION

Summary

AMQ::URI.parse returns verify false for amqps:// URIs that do not set the verify query parameter. This overrides the verify_peer true default in Bunny, so Bunny.new("amqps://…") connects without certificate and hostname verification.

Details

AMQ::URI::DEFAULTS and AMQ::Settings set verify and fail_if_no_peer_cert to false. When the URI has a query string, absent TLS parameters are also assigned false, so a URI with only a cacertfile parameter still disables verification.

Bunny applies its verify_peer true default only when verify, verify_peer and verify_ssl are all nil. The false value from amq-protocol prevents that.

The behavior was introduced in amq-protocol 2.3.0.

Impact

An attacker on the network path between an application and its RabbitMQ broker can impersonate the broker and obtain the connection credentials and messages.

Applications are affected when they connect with an amqps:// URI that does not include verify=true, for example one taken from RABBITMQ_URL or a URI handed out by a hosted broker.

Workarounds

Add verify=true to the URI (and cacertfile for a private CA), or pass verify_peer true to Bunny.new.

Patches

Fixed in amq-protocol 2.10.0. This changes behavior: amqps:// connections to brokers with self-signed or private-CA certificates now fail verification unless the URI includes cacertfile, or verify=false to keep the old behavior.

RELATED