The vulnerability in RabbitMQ's MQTT permission template engine is a context-blind regex escape failure. A clientid containing a hyphen, interpolated inside a [...] character class in an authorization template, widens the match from a literal to a range — silently expanding the client set authorized to read or write the governed topics.

This is the second wound from the same helper. The first fix wrapped interpolated clientid values in an escape function and shipped. That function was correct at the top level of a regex pattern and wrong inside a character class, where - is a range operator, ] closes the class early, and ^ inverts. The original patch closed the demonstrated attack vector; the second adds the hyphen. Both share the same structural defect: a deny-list escape whose validity depends on syntactic position, applied at call sites that carry no signal about which position they occupy.

CVSS 5.1 and EPSS 0.00253 both mislead. Exploitation is a single character. What gates it is configuration — specifically, whether the admin wrote a tight, range-style template. The blast radius per affected deployment is full read/write bypass on the topic namespace governed by that template, including any downstream queues or actuators that subscribe.

Defenders should:

  • Audit MQTT permission templates for {clientid} used inside [...] constructs. If present, treat the deployment as exposed until patched and reviewed.
  • Patch 4.0.x, 4.1.x, 4.2.x, and 4.3.x — four parallel maintenance streams, not one.
  • Treat the new fix as a partial closure. A character added to a deny list is the same architectural shape as the first fix. The structural remediation is to escape the clientid to a context-independent literal (\Q...\E) or stop interpolating user input into regex templates altogether.
  • Search the codebase for other callers of the same escape helper — it was likely imported from a module where it was correct for one grammar and is now used in others, and the same class of bug will fire there.