Origin
This vulnerability was identified by Team RabbitMQ and/or other teams at Broadcom, not via a responsible disclosure from an external researcher.
Source references
deps/rabbit/src/rabbit_amqp_filter_sql.erl:377 · ReDoS
Impact
An authenticated AMQP 1.0 consumer with read+write on a stream queue can cause ~100-200 ms of CPU per delivered message via a crafted LIKE filter, multiplied across thousands of messages and parallel sessions - a substantial backtracking-driven CPU amplification.
Description
pattern_to_regex maps % -> .? and _ -> ., then compiles ^...$ with only [unicode]; re:run is called with only [{capture, none}] - no explicit match_limit. A pattern like %%..._%X becomes ^.?..?.....?.X$ with overlapping lazy quantifiers. The whole-expression cap is ?MAX_EXPRESSION_LENGTH=4096 chars / ?MAX_TOKENS=200; a LIKE string literal is one token, so ~2000 %_ pairs fit. SQL filters are accepted unconditionally at rabbit_amqp_session.erl:3264 (no feature flag). Evaluated per-message at rabbit_stream_queue.erl:1439. OTP's default 10M match_limit caps each match at ~100-200 ms (not seconds), and the re NIF yields to the scheduler.
Exploit scenario
Attacker with read+write on a stream queue publishes messages with property p = "aaaa...(long, no X)", then attaches a receiver with filter p LIKE '%%%...%X' (~4080 chars). Each delivery candidate runs the catastrophic regex for ~100-200 ms; thousands of messages times parallel sessions saturate CPU.
Preconditions
- AMQP 1.0 with stream queues in use
- Attacker can attach a receiver with a filter (read permission) and publish messages with long property values (write permission)
CVSS
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N (2.3, Low). Fixed in 4.2.7, 4.3.1.
Origin
This vulnerability was identified by Team RabbitMQ and/or other teams at Broadcom, not via a responsible disclosure from an external researcher.
Source references
deps/rabbit/src/rabbit_amqp_filter_sql.erl:377· ReDoSImpact
An authenticated AMQP 1.0 consumer with read+write on a stream queue can cause ~100-200 ms of CPU per delivered message via a crafted LIKE filter, multiplied across thousands of messages and parallel sessions - a substantial backtracking-driven CPU amplification.
Description
pattern_to_regex maps % -> .? and _ -> ., then compiles ^...$ with only [unicode]; re:run is called with only [{capture, none}] - no explicit match_limit. A pattern like %%..._%X becomes ^.?..?.....?.X$ with overlapping lazy quantifiers. The whole-expression cap is ?MAX_EXPRESSION_LENGTH=4096 chars / ?MAX_TOKENS=200; a LIKE string literal is one token, so ~2000 %_ pairs fit. SQL filters are accepted unconditionally at rabbit_amqp_session.erl:3264 (no feature flag). Evaluated per-message at rabbit_stream_queue.erl:1439. OTP's default 10M match_limit caps each match at ~100-200 ms (not seconds), and the re NIF yields to the scheduler.
Exploit scenario
Attacker with read+write on a stream queue publishes messages with property p = "aaaa...(long, no X)", then attaches a receiver with filter p LIKE '%%%...%X' (~4080 chars). Each delivery candidate runs the catastrophic regex for ~100-200 ms; thousands of messages times parallel sessions saturate CPU.
Preconditions
CVSS
CVSS v4.0:
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N(2.3, Low). Fixed in4.2.7,4.3.1.